|
@@ -1,98 +0,0 @@
|
|
-name: CI
|
|
|
|
-
|
|
|
|
-on:
|
|
|
|
- pull_request:
|
|
|
|
- paths-ignore:
|
|
|
|
- - 'docs/**'
|
|
|
|
- push:
|
|
|
|
- paths-ignore:
|
|
|
|
- - 'docs/**'
|
|
|
|
-
|
|
|
|
-jobs:
|
|
|
|
-
|
|
|
|
- lint:
|
|
|
|
- runs-on: ubuntu-latest
|
|
|
|
-
|
|
|
|
- steps:
|
|
|
|
- - name: Git checkout
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- - name: Install node
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
- with:
|
|
|
|
- node-version: '10.x'
|
|
|
|
- - name: Restore cache
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
- env:
|
|
|
|
- cache-name: cache-node-modules
|
|
|
|
- with:
|
|
|
|
- path: ~/.npm
|
|
|
|
- key: ${{ runner.os }}-ci-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- restore-keys: |
|
|
|
|
- ${{ runner.os }}-ci-${{ env.cache-name }}-
|
|
|
|
- ${{ runner.os }}-ci-
|
|
|
|
- ${{ runner.os }}-
|
|
|
|
- - name: Install packages
|
|
|
|
- run: npm ci && sudo apt-get install xvfb
|
|
|
|
-
|
|
|
|
- - name: === Linting ===
|
|
|
|
- run: npm run test-lint
|
|
|
|
-
|
|
|
|
- unit:
|
|
|
|
- runs-on: ubuntu-latest
|
|
|
|
-
|
|
|
|
- steps:
|
|
|
|
- - name: Git checkout
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- - name: Install node
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
- with:
|
|
|
|
- node-version: '10.x'
|
|
|
|
- - name: Restore cache
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
- env:
|
|
|
|
- cache-name: cache-node-modules
|
|
|
|
- with:
|
|
|
|
- path: ~/.npm
|
|
|
|
- key: ${{ runner.os }}-ci-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- restore-keys: |
|
|
|
|
- ${{ runner.os }}-ci-${{ env.cache-name }}-
|
|
|
|
- ${{ runner.os }}-ci-
|
|
|
|
- ${{ runner.os }}-
|
|
|
|
- - name: Install packages
|
|
|
|
- run: npm ci && sudo apt-get install xvfb
|
|
|
|
-
|
|
|
|
- - name: === Unit testing ===
|
|
|
|
- run: npm run test-unit
|
|
|
|
-
|
|
|
|
- e2e:
|
|
|
|
- runs-on: ubuntu-latest
|
|
|
|
- strategy:
|
|
|
|
- matrix:
|
|
|
|
- CI: [ 0, 1, 2, 3 ]
|
|
|
|
- env:
|
|
|
|
- CI: ${{ matrix.CI }}
|
|
|
|
- FORCE_COLOR: 1
|
|
|
|
-
|
|
|
|
- steps:
|
|
|
|
- - name: Git checkout
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- - name: Install node
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
- with:
|
|
|
|
- node-version: '10.x'
|
|
|
|
- - name: Restore cache
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
- env:
|
|
|
|
- cache-name: cache-node-modules
|
|
|
|
- with:
|
|
|
|
- path: ~/.npm
|
|
|
|
- key: ${{ runner.os }}-ci-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- restore-keys: |
|
|
|
|
- ${{ runner.os }}-ci-${{ env.cache-name }}-
|
|
|
|
- ${{ runner.os }}-ci-
|
|
|
|
- ${{ runner.os }}-
|
|
|
|
- - name: Install packages
|
|
|
|
- run: npm ci && sudo apt-get install xvfb
|
|
|
|
-
|
|
|
|
- - name: === End-to-end testing ===
|
|
|
|
- run: xvfb-run --auto-servernum npm run test-e2e
|
|
|