2023-03-27 05:01:50 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
2023-04-14 01:40:30 +00:00
|
|
|
adr-0001-depcheck:
|
|
|
|
name: No-dependencies check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: . ./script/check-deps
|
|
|
|
|
2023-04-14 13:36:20 +00:00
|
|
|
commit-lint:
|
|
|
|
name: Commit message hygiene
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- run: git fetch
|
|
|
|
- run: . ./script/lint-commits
|
|
|
|
|
2023-03-27 05:01:50 +00:00
|
|
|
dependencies:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-09 21:16:25 +00:00
|
|
|
node-version: [16, 18]
|
2023-03-27 05:01:50 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{env.cache-name}}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
|
|
|
|
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
|
2023-04-11 03:43:21 +00:00
|
|
|
run: corepack enable && yarn
|
2023-04-15 05:28:59 +00:00
|
|
|
|
2023-04-15 20:30:05 +00:00
|
|
|
typecheck:
|
|
|
|
name: Typecheck
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: dependencies
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-18
|
|
|
|
- run: |
|
|
|
|
corepack enable && yarn
|
|
|
|
yarn types:check
|
|
|
|
|
2023-04-15 04:34:06 +00:00
|
|
|
integration:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: dependencies
|
|
|
|
name: Integration tests
|
2023-04-15 05:28:59 +00:00
|
|
|
env:
|
|
|
|
SHELL: /usr/bin/bash
|
2023-04-15 04:34:06 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [16, 18]
|
2023-03-27 05:01:50 +00:00
|
|
|
|
2023-04-15 04:34:06 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
|
|
|
|
- run: |
|
|
|
|
corepack enable && yarn
|
|
|
|
yarn test:integration
|
2023-03-27 05:01:50 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: dependencies
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-18
|
|
|
|
- run: |
|
2023-04-11 03:43:21 +00:00
|
|
|
corepack enable && yarn
|
2023-03-27 05:01:50 +00:00
|
|
|
yarn lint
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: dependencies
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-11 03:43:21 +00:00
|
|
|
node-version: [16, 18]
|
2023-03-27 05:01:50 +00:00
|
|
|
|
2023-04-15 05:28:59 +00:00
|
|
|
env:
|
|
|
|
SHELL: /usr/bin/bash
|
2023-03-27 05:01:50 +00: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: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
|
|
|
|
- run: |
|
2023-04-11 03:43:21 +00:00
|
|
|
corepack enable && yarn
|
|
|
|
yarn test --workers=2 --ts
|
2023-03-27 05:01:50 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: dependencies
|
2023-04-15 05:28:59 +00:00
|
|
|
env:
|
|
|
|
SHELL: /usr/bin/bash
|
2023-03-27 05:01:50 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-09 21:16:25 +00:00
|
|
|
node-version: [16, 18]
|
2023-03-27 05:01:50 +00: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: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
|
|
|
|
- run: |
|
2023-04-11 03:43:21 +00:00
|
|
|
corepack enable && yarn
|
2023-03-27 05:01:50 +00:00
|
|
|
yarn build
|