-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (34 loc) · 1.01 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
on: push
name: Build on push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: '12'
- run: npm install -g yarn
- name: Get yarn cache dir
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn lint
- run: yarn compile
- run: yarn test:coverage
- name: Check coverage reports
if: failure()
id: reports-exists
run: (test -d coverage && echo "::set-output name=exists::1") || echo "coverage doesn't exists"
- name: Upload coverage reports
if: failure() && steps.reports-exists.outputs.exists == 1
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage