2021-03-19 21:07:45 +00:00
|
|
|
|
name: Node CI
|
|
|
|
|
|
2021-04-21 16:55:49 +00:00
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
|
|
|
|
pull_request:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
2021-03-19 21:07:45 +00:00
|
|
|
|
|
|
|
|
|
jobs:
|
2021-05-12 18:06:16 +00:00
|
|
|
|
skip_run:
|
2021-04-21 16:55:49 +00:00
|
|
|
|
continue-on-error: true
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
outputs:
|
|
|
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
|
|
|
steps:
|
|
|
|
|
- id: skip_check
|
|
|
|
|
uses: fkirc/skip-duplicate-actions@master
|
|
|
|
|
with:
|
|
|
|
|
concurrent_skipping: 'never'
|
|
|
|
|
skip_after_successful_duplicate: 'true'
|
2021-05-28 02:05:29 +00:00
|
|
|
|
paths_ignore: '["README.md", "**/README.md", "docs/**"]'
|
|
|
|
|
do_not_skip: '["workflow_dispatch", "schedule"]'
|
2021-05-12 18:06:16 +00:00
|
|
|
|
changeset:
|
|
|
|
|
needs: skip_run # allow skip_run to cancel this job if it’s not needed
|
|
|
|
|
if: ${{ needs.skip_run.outputs.should_skip != 'true' }}
|
|
|
|
|
name: Ensure changeset
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: Check out PR branch
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
- name: Check out main branch
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
with:
|
|
|
|
|
ref: main
|
|
|
|
|
|
|
|
|
|
- name: Set up Node.js 14.x
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
with:
|
|
|
|
|
node-version: 14.x
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
|
run: yarn --frozen-lockfile --ignore-engines
|
|
|
|
|
env:
|
|
|
|
|
CI: true
|
|
|
|
|
|
|
|
|
|
- run: yarn changeset status --since=main
|
2021-03-26 19:45:53 +00:00
|
|
|
|
test:
|
2021-05-12 18:06:16 +00:00
|
|
|
|
needs: skip_run # allow skip_run to cancel this job if it’s not needed
|
|
|
|
|
if: ${{ needs.skip_run.outputs.should_skip != 'true' }}
|
2021-04-14 19:21:25 +00:00
|
|
|
|
runs-on: ${{ matrix.os }}
|
2021-03-19 21:07:45 +00:00
|
|
|
|
strategy:
|
|
|
|
|
matrix:
|
2021-04-14 19:21:25 +00:00
|
|
|
|
os: [ubuntu-latest, windows-latest]
|
2021-05-12 18:06:16 +00:00
|
|
|
|
node-version: [14.x, 16.x]
|
2021-03-19 21:07:45 +00:00
|
|
|
|
steps:
|
2021-05-12 18:06:16 +00:00
|
|
|
|
- uses: actions/checkout@v2
|
2021-03-26 19:45:53 +00:00
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2021-05-12 18:06:16 +00:00
|
|
|
|
uses: actions/setup-node@v2
|
2021-03-26 19:45:53 +00:00
|
|
|
|
with:
|
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2021-05-12 18:06:16 +00:00
|
|
|
|
- run: yarn --frozen-lockfile --ignore-engines
|
2021-04-30 21:33:35 +00:00
|
|
|
|
env:
|
|
|
|
|
CI: true
|
|
|
|
|
- run: yarn build
|
|
|
|
|
env:
|
|
|
|
|
CI: true
|
|
|
|
|
- run: yarn test
|
2021-03-26 19:45:53 +00:00
|
|
|
|
env:
|
|
|
|
|
CI: true
|
2021-06-10 16:30:48 +00:00
|
|
|
|
GITHUB_SHA: $GITHUB_SHA
|