2021-08-09 17:30:25 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-03-16 13:58:53 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
2021-08-09 17:30:25 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
2022-03-16 13:58:53 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
2021-08-09 17:30:25 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2022-02-21 10:26:51 +00:00
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
2022-03-18 13:13:19 +00:00
|
|
|
node: [16]
|
2022-02-21 10:26:51 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-01 18:25:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-25 11:44:21 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2022-02-21 10:26:51 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
cache: 'yarn'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn --immutable
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: yarn build
|
|
|
|
|
|
|
|
- name: Cache dist
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: packages/*/dist
|
|
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
|
|
|
|
|
2021-08-09 17:30:25 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
2022-03-18 13:13:19 +00:00
|
|
|
node: [16]
|
2021-08-09 17:30:25 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-01 18:25:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-25 11:44:21 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2021-08-09 17:30:25 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
cache: 'yarn'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn --immutable
|
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: yarn lint
|
|
|
|
|
2022-02-18 18:14:57 +00:00
|
|
|
test-fixtures:
|
2021-08-09 17:30:25 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-16 13:41:37 +00:00
|
|
|
os: [ubuntu-latest, windows-latest]
|
2022-03-18 13:13:19 +00:00
|
|
|
node: [16]
|
2021-08-09 17:30:25 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-01 18:25:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-25 11:44:21 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2021-08-09 17:30:25 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
cache: 'yarn'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn --immutable
|
|
|
|
|
2022-02-18 18:14:57 +00:00
|
|
|
- name: Stub
|
|
|
|
run: yarn stub
|
2021-08-09 17:30:25 +00:00
|
|
|
|
2021-08-10 00:27:23 +00:00
|
|
|
- name: Test (unit)
|
|
|
|
run: yarn test:unit
|
|
|
|
|
2022-02-18 18:14:57 +00:00
|
|
|
- name: Test (fixtures)
|
|
|
|
run: yarn test:fixtures
|
2021-08-09 17:30:25 +00:00
|
|
|
|
2022-02-18 18:14:57 +00:00
|
|
|
test-fixtures-webpack:
|
2021-08-09 17:30:25 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-16 13:41:37 +00:00
|
|
|
os: [ubuntu-latest, windows-latest]
|
2022-03-18 13:13:19 +00:00
|
|
|
node: [16]
|
2021-08-09 17:30:25 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-01 18:25:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-25 11:44:21 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2021-08-09 17:30:25 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
cache: 'yarn'
|
2022-02-18 18:14:57 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn --immutable
|
|
|
|
|
|
|
|
- name: Stub
|
|
|
|
run: yarn stub
|
|
|
|
|
|
|
|
- name: Test (fixtures)
|
|
|
|
run: yarn test:fixtures:webpack
|
|
|
|
|
|
|
|
test-types:
|
2022-02-21 10:26:51 +00:00
|
|
|
needs:
|
|
|
|
- build
|
2022-02-18 18:14:57 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
2022-03-18 13:13:19 +00:00
|
|
|
node: [16]
|
2022-02-18 18:14:57 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-01 18:25:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-25 11:44:21 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2022-02-18 18:14:57 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
cache: 'yarn'
|
2021-08-09 17:30:25 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn --immutable
|
|
|
|
|
2022-02-21 10:26:51 +00:00
|
|
|
- name: Restore dist cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: packages/*/dist
|
|
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
|
2021-08-09 17:30:25 +00:00
|
|
|
|
2022-02-18 18:14:57 +00:00
|
|
|
- name: Test (types)
|
|
|
|
run: yarn test:types
|
2021-08-09 17:30:25 +00:00
|
|
|
|
|
|
|
build-release:
|
2022-03-16 13:58:53 +00:00
|
|
|
if: |
|
|
|
|
github.event_name == 'push' &&
|
|
|
|
!contains(github.event.head_commit.message, '[skip-release]') &&
|
|
|
|
!contains(github.event.head_commit.message, 'chore') &&
|
|
|
|
!contains(github.event.head_commit.message, 'docs')
|
2021-08-09 17:30:25 +00:00
|
|
|
needs:
|
|
|
|
- lint
|
2022-02-21 10:26:51 +00:00
|
|
|
- build
|
2022-02-18 18:14:57 +00:00
|
|
|
- test-fixtures
|
|
|
|
- test-fixtures-webpack
|
|
|
|
- test-types
|
2021-08-09 17:30:25 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
2022-03-18 13:13:19 +00:00
|
|
|
node: [16]
|
2021-08-09 17:30:25 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-01 18:25:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-25 11:44:21 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2021-08-09 17:30:25 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
cache: 'yarn'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn --immutable
|
|
|
|
|
2022-02-21 10:26:51 +00:00
|
|
|
- name: Restore dist cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: packages/*/dist
|
|
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
|
2021-08-09 17:30:25 +00:00
|
|
|
|
|
|
|
- name: Release Edge
|
|
|
|
run: ./scripts/release-edge.sh
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
|