-
Notifications
You must be signed in to change notification settings - Fork 25
46 lines (41 loc) · 1.31 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: 22
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js '${{ env.node }}'
uses: actions/setup-node@v4
with:
node-version: '${{ env.node }}'
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node_modules-
# see prepare script
- name: Install Dependencies and Build Library
run: npm install
- name: TypeScript Tests
run: npm run 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: npm run prettier:check
if: success() || failure()
- name: TypeScript Code Style
run: npm run lint
if: success() || failure()