2023-04-21 16:06:21 +00:00
|
|
|
name: Checks
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
merge_group:
|
|
|
|
push:
|
2023-05-30 14:28:56 +00:00
|
|
|
branches: [main]
|
2023-04-21 16:06:21 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
CI: 1
|
|
|
|
PRINT_GITHUB_ANNOTATIONS: 1
|
|
|
|
|
2023-05-09 16:08:38 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2023-04-21 16:06:21 +00:00
|
|
|
jobs:
|
2024-01-16 14:38:05 +00:00
|
|
|
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
|
|
|
|
|
2024-01-16 14:38:05 +00:00
|
|
|
- uses: ./.github/actions/setup
|
2023-04-21 16:06:21 +00:00
|
|
|
|
2024-01-29 20:42:06 +00:00
|
|
|
- name: Check version constraints
|
|
|
|
run: yarn constraints
|
|
|
|
|
|
|
|
- name: Check for duplicate dependencies
|
|
|
|
run: yarn dedupe --check
|
|
|
|
|
2024-01-30 11:41:46 +00:00
|
|
|
# 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
|
|
|
|
|
2024-02-21 13:07:53 +00:00
|
|
|
- name: Check tsconfigs
|
|
|
|
run: yarn check-tsconfigs
|
|
|
|
|
2023-04-21 16:06:21 +00:00
|
|
|
- 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
|
|
|
|
2024-01-16 14:38:05 +00:00
|
|
|
- name: Test
|
2024-02-14 16:05:59 +00:00
|
|
|
run: yarn test-ci
|
2024-01-16 14:38:05 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2023-05-30 14:28:56 +00:00
|
|
|
- name: Pack public packages
|
|
|
|
run: "yarn lazy pack-tarball | sed -E 's/^.*? ::/::/'"
|