2019-09-26 17:48:38 -04:00
|
|
|
name: Node CI
|
|
|
|
|
2019-10-23 10:54:50 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
2020-02-03 13:47:01 +02:00
|
|
|
paths-ignore:
|
|
|
|
- 'website/**'
|
|
|
|
|
2019-10-23 10:54:50 +03:00
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened]
|
2019-09-26 17:48:38 -04:00
|
|
|
|
2020-02-03 13:47:01 +02:00
|
|
|
paths-ignore:
|
|
|
|
- 'website/**'
|
|
|
|
|
2019-09-26 17:48:38 -04:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-03-23 14:57:18 +02:00
|
|
|
runs-on: ${{ matrix.os }}
|
2019-09-26 17:48:38 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-03-23 14:57:18 +02:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
2019-09-26 17:48:38 -04:00
|
|
|
steps:
|
2022-03-07 14:32:47 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-05-19 20:52:50 +02:00
|
|
|
- name: Use Node.js
|
2022-03-07 14:33:17 +02:00
|
|
|
uses: actions/setup-node@v3
|
2019-10-22 19:59:13 +03:00
|
|
|
with:
|
2021-09-13 10:54:31 +02:00
|
|
|
node-version: '*'
|
2021-05-19 20:52:50 +02:00
|
|
|
check-latest: true
|
2020-04-30 15:27:44 +03:00
|
|
|
- name: log versions
|
|
|
|
run: node --version && npm --version && yarn --version
|
|
|
|
- name: install dependecies
|
2021-12-13 14:18:50 +01:00
|
|
|
run: yarn --frozen-lockfile --network-timeout 1000000 && yarn bootstrap
|
2020-04-30 15:27:44 +03:00
|
|
|
- name: run unit tests
|
|
|
|
run: yarn test:ci
|
2019-10-22 19:59:13 +03:00
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
NODE_OPTIONS: --max-old-space-size=4096
|
2020-04-30 15:27:44 +03:00
|
|
|
- name: build demo site
|
|
|
|
run: yarn build:demo
|
|
|
|
env:
|
|
|
|
NODE_OPTIONS: --max-old-space-size=4096
|
2019-10-22 19:59:13 +03:00
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
with:
|
2021-05-19 20:52:50 +02:00
|
|
|
name: dev-test-website-${{ runner.os }}
|
2019-10-22 19:59:13 +03:00
|
|
|
path: dev-test
|
|
|
|
|
2021-02-07 06:21:15 -08:00
|
|
|
e2e-with-cypress:
|
2019-10-22 19:59:13 +03:00
|
|
|
needs: build
|
2020-03-23 14:57:18 +02:00
|
|
|
runs-on: ubuntu-latest
|
2019-10-22 19:59:13 +03:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-12-18 18:16:02 +02:00
|
|
|
machine: [1, 2, 3, 4, 5, 6, 7, 8]
|
2021-01-29 06:04:45 -08:00
|
|
|
fail-fast: false
|
2019-10-22 19:59:13 +03:00
|
|
|
|
|
|
|
steps:
|
2022-03-07 14:32:47 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-05-19 20:52:50 +02:00
|
|
|
- name: Use Node.js
|
2022-03-07 14:33:17 +02:00
|
|
|
uses: actions/setup-node@v3
|
2019-10-22 19:59:13 +03:00
|
|
|
with:
|
2021-05-19 20:52:50 +02:00
|
|
|
node-version: '*'
|
|
|
|
check-latest: true
|
2021-11-08 12:02:51 +01:00
|
|
|
cache: yarn
|
2019-10-22 19:59:13 +03:00
|
|
|
- uses: actions/download-artifact@master
|
|
|
|
with:
|
2021-05-19 20:52:50 +02:00
|
|
|
name: dev-test-website-${{ runner.os }}
|
2019-10-22 19:59:13 +03:00
|
|
|
path: dev-test
|
2021-02-07 06:21:15 -08:00
|
|
|
- name: npm install
|
2019-10-22 19:59:13 +03:00
|
|
|
run: |
|
|
|
|
node --version
|
|
|
|
npm --version
|
|
|
|
yarn --version
|
2019-11-11 11:19:47 +02:00
|
|
|
yarn --frozen-lockfile
|
2021-02-07 06:21:15 -08:00
|
|
|
- name: e2e test
|
|
|
|
run: |
|
2019-10-22 19:59:13 +03:00
|
|
|
yarn test:e2e:run-ci
|
|
|
|
env:
|
2021-02-07 06:21:15 -08:00
|
|
|
IS_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }}
|
2019-10-22 19:59:13 +03:00
|
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
|
|
NODE_OPTIONS: --max-old-space-size=4096
|
2021-02-07 06:21:15 -08:00
|
|
|
MACHINE_COUNT: 8
|
|
|
|
MACHINE_INDEX: ${{ matrix.machine }}
|
2022-03-07 12:08:34 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-03-21 18:02:59 +01:00
|
|
|
if: ${{ always() }}
|
2021-02-09 04:16:13 -08:00
|
|
|
with:
|
|
|
|
name: cypress-results-${{ matrix.machine }}
|
|
|
|
path: |
|
|
|
|
cypress/screenshots
|
|
|
|
cypress/videos
|