2020-05-08 18:38:33 +03:00
|
|
|
name: Tests
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-06-30 20:49:38 +03:00
|
|
|
- master
|
2020-05-08 18:38:33 +03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2020-06-30 20:49:38 +03:00
|
|
|
- master
|
2020-05-08 18:38:33 +03:00
|
|
|
jobs:
|
|
|
|
integration-tests:
|
|
|
|
name: Integration tests
|
|
|
|
runs-on: ubuntu-16.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '12'
|
2020-05-13 01:14:39 +03:00
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
2020-07-10 22:25:15 +03:00
|
|
|
- run: yarn install --frozen-lockfile
|
|
|
|
- run: yarn cypress install
|
|
|
|
- run: yarn build
|
2020-05-08 18:38:33 +03:00
|
|
|
- run: yarn integration-test
|
|
|
|
|
|
|
|
unit-tests:
|
|
|
|
name: Unit tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '12'
|
2020-05-13 01:14:39 +03:00
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
2020-07-10 22:25:15 +03:00
|
|
|
- run: yarn install --frozen-lockfile
|
2020-05-08 18:38:33 +03:00
|
|
|
- run: yarn test
|
|
|
|
|
2020-05-08 21:50:27 +03:00
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '12'
|
2020-05-13 01:14:39 +03:00
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
2020-07-10 22:25:15 +03:00
|
|
|
- run: yarn install --frozen-lockfile
|
2020-05-08 21:50:27 +03:00
|
|
|
- run: yarn lint
|
|
|
|
|