tldraw/.github/workflows/checks.yml
Dan Groshev cc1e5196dd
Use github actions to mirror templates from monorepo to appropriate repos (#2781)
The idea here is to mirror project templates from our monorepo to the
corresponding "top level" repos in our organisation. The main benefits
are:

- being able to easily synchronise template versions to the last release
on release
- being able to test those templates together with the rest of the
project
- being able to deploy the unreleased version of the templates 

However, this PR will only do the synchronisation part. The main
roadblock for the latter at the moment is running `yarn install` on
packages in the current `main` that are still unreleased. There are ways
around that, but this PR is deliberately minimalistic to land it sooner.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package

---------

Co-authored-by: Taha <98838967+Taha-Hassan-Git@users.noreply.github.com>
2024-02-29 10:48:31 +00:00

76 lines
No EOL
1.8 KiB
YAML

name: Checks
on:
pull_request:
merge_group:
push:
branches: [main]
env:
CI: 1
PRINT_GITHUB_ANNOTATIONS: 1
defaults:
run:
shell: bash
jobs:
test:
name: 'Tests & checks'
timeout-minutes: 15
runs-on: ubuntu-latest-16-cores-open # TODO: this should probably run on multiple OSes
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: Check version constraints
run: yarn constraints
- name: Check for duplicate dependencies
run: yarn dedupe --check
# Not the most sophisticated way to check for warnings, but I don't think
# Yarn can be convinced to exit with a non-zero exit code on warnings
# see also https://unix.stackexchange.com/a/433713 for the explanation of the parameters
- name: Check for installation warnings
run: 'yarn | grep -vzq "with warnings"'
- name: Typecheck
run: yarn build-types
- name: Check scripts
run: yarn check-scripts
- name: Check tsconfigs
run: yarn check-tsconfigs
- name: Lint
run: yarn lint
- name: Check API declarations and docs work as intended
run: yarn api-check
- name: Test
run: yarn test-ci
build:
name: 'Build all projects'
timeout-minutes: 15
runs-on: ubuntu-latest-16-cores-open
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: Build all projects
# the sed pipe makes sure that github annotations come through without
# turbo's prefix
run: "yarn build | sed -E 's/^.*? ::/::/'"
- name: Pack public packages
run: "yarn lazy pack-tarball | sed -E 's/^.*? ::/::/'"