2019-11-03 15:18:37 +01:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-07-15 10:22:33 +02:00
|
|
|
node-version: [16.x]
|
2019-11-03 15:18:37 +01:00
|
|
|
steps:
|
2021-07-29 12:04:04 +02:00
|
|
|
- uses: actions/checkout@v2
|
2019-11-17 20:57:55 +01:00
|
|
|
|
2019-11-03 15:18:37 +01:00
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
2021-07-29 12:04:04 +02:00
|
|
|
uses: actions/setup-node@v2
|
2019-11-03 15:18:37 +01:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2019-11-17 20:57:55 +01:00
|
|
|
|
2019-11-03 15:18:37 +01:00
|
|
|
- name: Install Yarn
|
2019-11-12 22:10:16 +01:00
|
|
|
run: npm i yarn --global
|
2019-11-17 21:41:55 +01:00
|
|
|
|
2020-02-21 10:00:36 +01:00
|
|
|
- name: Cache Node Modules
|
2021-07-29 12:04:04 +02:00
|
|
|
uses: actions/cache@v2
|
2020-02-16 19:32:10 +01:00
|
|
|
with:
|
2020-02-21 10:00:36 +01:00
|
|
|
path: .cache
|
|
|
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
|
|
|
|
- name: Install Packages
|
|
|
|
run: |
|
|
|
|
yarn config set cache-folder $GITHUB_WORKSPACE/.cache/yarn
|
|
|
|
yarn install --frozen-lockfile
|
|
|
|
env:
|
|
|
|
CYPRESS_CACHE_FOLDER: .cache/Cypress
|
2019-11-17 21:41:55 +01:00
|
|
|
|
2019-11-03 15:18:37 +01:00
|
|
|
- name: Run Build
|
|
|
|
run: yarn build
|
2020-02-16 09:40:35 +01:00
|
|
|
|
2020-01-08 20:52:39 +01:00
|
|
|
- name: Upload Build as Artifact
|
2021-07-29 12:04:04 +02:00
|
|
|
uses: actions/upload-artifact@v2
|
2020-01-08 20:52:39 +01:00
|
|
|
with:
|
|
|
|
name: dist
|
|
|
|
path: dist
|
2019-11-03 15:18:37 +01:00
|
|
|
|
|
|
|
- name: Run Unit Tests
|
|
|
|
run: |
|
|
|
|
yarn test --coverage
|
2020-02-16 09:40:35 +01:00
|
|
|
|
2020-04-27 19:50:49 +02:00
|
|
|
#- name: Upload Test Results
|
|
|
|
# uses: coverallsapp/github-action@v1.0.1
|
|
|
|
# with:
|
|
|
|
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# parallel: true
|
2019-11-03 15:18:37 +01:00
|
|
|
|
2020-02-21 10:00:36 +01:00
|
|
|
# - name: Run E2E Tests
|
|
|
|
# run: yarn e2e
|
|
|
|
# env:
|
|
|
|
# PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
|
|
|
# CYPRESS_CACHE_FOLDER: .cache/Cypress
|
2020-02-16 17:11:13 +01:00
|
|
|
|
2020-05-01 15:16:39 +02:00
|
|
|
#- name: Post Upload Test Results
|
|
|
|
# uses: coverallsapp/github-action@master
|
|
|
|
# with:
|
|
|
|
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
2021-07-29 12:04:04 +02:00
|
|
|
# parallel-finished: true
|