-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.23 KB
/
unit-tests.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
47
48
49
50
51
name: 'UnitTests'
on:
workflow_call:
inputs:
node-version:
required: true
type: string
jobs:
unittests:
runs-on: ubuntu-latest
steps:
- name: Clean Workspace
uses: mickem/clean-after-action@v2
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
registry-url: 'https://npm.pkg.github.com'
scope: '@ZeroGachis'
- name: Install dependencies
run: npm ci --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Rebuild & Prepare dependencies
run: npm rebuild && npm run prepare --if-present
- name: Run lint
run: npm run lint
- name: Run TS compilation
run: npm run type:check
- name: Run unit tests
run: npm run test -- --reporters=default --reporters=jest-junit
- name: Test Report
uses: dorny/test-reporter@e9fa2f582c0ebbe2e263fd18fad744d52e0b0203
id: test-report
if: ${{ github.actor != 'dependabot[bot]' }}
with:
name: "UT Report"
path: junit.xml
reporter: jest-junit
max-annotations: 0