2021-09-24 00:47:06 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-03-13 18:22:51 +00:00
|
|
|
branches: ['main']
|
2022-06-29 14:46:51 +00:00
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize]
|
2021-09-24 00:47:06 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-06-29 14:46:51 +00:00
|
|
|
build:
|
2023-03-13 18:22:51 +00:00
|
|
|
name: Build and Test
|
|
|
|
timeout-minutes: 15
|
|
|
|
runs-on: ${{ matrix.os }}
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
steps:
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-04-26 10:06:18 +00:00
|
|
|
node-version: 18
|
2023-03-13 18:22:51 +00:00
|
|
|
cache: 'yarn'
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn --frozen-lockfile
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Build
|
|
|
|
run: yarn build
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Typecheck
|
|
|
|
run: yarn typecheck
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Lint
|
2023-03-13 20:48:08 +00:00
|
|
|
run: yarn lint && yarn format --check
|
2022-06-29 14:46:51 +00:00
|
|
|
|
2023-03-13 18:22:51 +00:00
|
|
|
- name: Test
|
|
|
|
run: yarn test
|