tldraw/.github/workflows/checks.yml

74 lines
1.7 KiB
YAML
Raw Normal View History

2023-04-21 16:06:21 +00:00
name: Checks
on:
pull_request:
merge_group:
push:
branches: [main]
2023-04-21 16:06:21 +00:00
env:
CI: 1
PRINT_GITHUB_ANNOTATIONS: 1
defaults:
run:
shell: bash
2023-04-21 16:06:21 +00:00
jobs:
test:
name: 'Tests & checks'
2023-04-21 16:06:21 +00:00
timeout-minutes: 15
2023-04-21 16:18:25 +00:00
runs-on: ubuntu-latest-16-cores-open # TODO: this should probably run on multiple OSes
2023-04-21 16:06:21 +00:00
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: ./.github/actions/setup
2023-04-21 16:06:21 +00:00
- 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"'
2023-04-21 16:06:21 +00:00
- name: Typecheck
2023-05-02 12:25:26 +00:00
run: yarn build-types
2023-04-21 16:06:21 +00:00
- name: Check scripts
run: yarn check-scripts
- name: Lint
run: yarn lint
- name: Check API declarations and docs work as intended
2023-05-02 12:25:26 +00:00
run: yarn api-check
2023-04-21 16:06:21 +00:00
- 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
2023-04-21 16:06:21 +00:00
- name: Build all projects
# the sed pipe makes sure that github annotations come through without
# turbo's prefix
2023-05-02 12:25:26 +00:00
run: "yarn build | sed -E 's/^.*? ::/::/'"
2023-04-21 16:06:21 +00:00
- name: Pack public packages
run: "yarn lazy pack-tarball | sed -E 's/^.*? ::/::/'"