chore: split up browser and node tests
Makes sure that only node tests are ran on multiple versions, rather than also running linting and browser tests on multiple node versions
This commit is contained in:
parent
5cd2c3491c
commit
c8a5d60f62
2 changed files with 71 additions and 9 deletions
78
.github/workflows/verify.yml
vendored
78
.github/workflows/verify.yml
vendored
|
|
@ -3,13 +3,61 @@ name: Verify changes
|
||||||
on: pull_request
|
on: pull_request
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
install:
|
||||||
|
name: Install dependencies
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Node 12.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Node Modules
|
||||||
|
path: node_modules
|
||||||
|
|
||||||
verify:
|
verify:
|
||||||
name: Verify changes
|
name: Verify changes
|
||||||
|
needs: install
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download math result for job 1
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Node Modules
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Node 12.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: yarn lint
|
||||||
|
|
||||||
|
- name: Bundlesize
|
||||||
|
run: yarn bundlesize
|
||||||
|
|
||||||
|
browser-tests:
|
||||||
|
name: Browser tests
|
||||||
|
needs: install
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [12.x, 14.x]
|
node-version: [12.x, 14.x]
|
||||||
steps:
|
steps:
|
||||||
|
- name: Download math result for job 1
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Node Modules
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node ${{ matrix.node-version }}
|
- name: Setup Node ${{ matrix.node-version }}
|
||||||
|
|
@ -17,14 +65,28 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Test
|
||||||
run: yarn --frozen-lockfile
|
run: yarn test:browser
|
||||||
|
|
||||||
- name: Lint
|
node-tests:
|
||||||
run: yarn lint
|
name: Node tests
|
||||||
|
needs: install
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [12.x, 14.x]
|
||||||
|
steps:
|
||||||
|
- name: Download math result for job 1
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Node Modules
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Node ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn test
|
run: yarn test:node
|
||||||
|
|
||||||
- name: Bundlesize
|
|
||||||
run: yarn bundlesize
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
"lint:prettier": "prettier \"**/*.js\" --list-different || (echo '↑↑ these files are not prettier formatted ↑↑' && exit 1)",
|
"lint:prettier": "prettier \"**/*.js\" --list-different || (echo '↑↑ these files are not prettier formatted ↑↑' && exit 1)",
|
||||||
"lint:types": "tsc",
|
"lint:types": "tsc",
|
||||||
"lint:versions": "node ./scripts/lint-versions.js",
|
"lint:versions": "node ./scripts/lint-versions.js",
|
||||||
"release": "npm run build:types && npm run build:docs && changeset release",
|
"release": "npm run build:types && npm run build:docs && changeset publish",
|
||||||
"start": "npm run storybook",
|
"start": "npm run storybook",
|
||||||
"storybook": "start-storybook -p 9001",
|
"storybook": "start-storybook -p 9001",
|
||||||
"storybook:build": "build-storybook",
|
"storybook:build": "build-storybook",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue