2023-02-04 20:23:26 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-07-16 22:19:21 +02:00
|
|
|
node-version: [18.x]
|
2023-02-04 20:23:26 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: ./.github/actions/yarn-nm-install
|
|
|
|
|
|
|
|
- run: yarn build
|
|
|
|
Lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-07-16 22:19:21 +02:00
|
|
|
node-version: [18.x]
|
2023-02-04 20:23:26 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: ./.github/actions/yarn-nm-install
|
|
|
|
|
|
|
|
- run: yarn lint:all --max-warnings 0
|
|
|
|
|
|
|
|
Test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-07-16 22:19:21 +02:00
|
|
|
node-version: [18.x]
|
2023-02-04 20:23:26 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: ./.github/actions/yarn-nm-install
|
|
|
|
|
|
|
|
- run: yarn test
|
|
|
|
Typecheck:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-07-16 22:19:21 +02:00
|
|
|
node-version: [18.x]
|
2023-02-04 20:23:26 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: ./.github/actions/yarn-nm-install
|
|
|
|
|
|
|
|
- run: yarn typecheck
|
|
|
|
VisualRegression:
|
|
|
|
name: Visual regression tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-07-16 22:19:21 +02:00
|
|
|
node-version: [18.x]
|
2023-02-04 20:23:26 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: ./.github/actions/yarn-nm-install
|
|
|
|
|
|
|
|
- name: Run e2e tests with percy
|
|
|
|
uses: percy/exec-action@v0.3.1
|
|
|
|
with:
|
|
|
|
custom-command: 'yarn test:e2e:ci'
|
|
|
|
env:
|
|
|
|
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
|
|
|
|
|
|
|
Compatibility-Tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-07-16 22:19:21 +02:00
|
|
|
node-version: [18.x]
|
2023-02-04 20:23:26 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: ./.github/actions/yarn-nm-install
|
|
|
|
# re-enable the following line if we start to get EINTEGRITY errors again
|
|
|
|
# - run: npm cache clean || npm cache verify
|
2023-07-28 19:49:52 +02:00
|
|
|
# This will test whether `npm install`/`yarn install` can actually run on each compatibility test fixture. See `compat-tests/README.md` for more info.
|
|
|
|
- run: yarn workspace @theatre/compat-tests run install-fixtures --verbose
|
2023-02-04 20:23:26 +01:00
|
|
|
# after that, we run the jest tests for each fixture
|
2023-07-30 17:50:21 +02:00
|
|
|
- run: yarn test:compat:run --verbose
|