-
Notifications
You must be signed in to change notification settings - Fork 24
46 lines (41 loc) · 1.29 KB
/
build.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
35
36
37
38
39
40
41
42
43
44
45
46
name: Build
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
env:
node: 16.x
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js '${{ env.node }}'
uses: actions/setup-node@v1
with:
node-version: '${{ env.node }}'
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
# see prepare script
- name: Install Dependencies and Build Library
run: yarn install
- name: TypeScript Tests
run: yarn test:coverage --ci
- name: "Codacy: Report coverage"
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info
if: (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) && (success() || failure())
- name: TypeScript Formatting
run: yarn prettier:check
if: success() || failure()
- name: TypeScript Code Style
run: yarn lint
if: success() || failure()