forked from hexschool/typescript-challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.05 KB
/
main.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
name: TypeScript Test
on:
push:
branches: ["main"]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout to Repo Directory
uses: actions/checkout@v2
- name: Use Node.js 18.16.0
uses: actions/setup-node@v2
with:
node-version: "18.16.0"
- name: NPM ci and cacheing
uses: bahmutov/npm-install@v1
with:
useRollingCache: true
unittest:
name: Run UnitTest
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout to Repo Directory
uses: actions/checkout@v2
- name: Use Node.js 18.16.0
uses: actions/setup-node@v2
with:
node-version: "18.16.0"
- name: Get Cache Node Module
uses: bahmutov/npm-install@v1
with:
useRollingCache: true
- name: run unit test
run: npm run test:coverage
- name: Upload coverage report
uses: actions/upload-artifact@v2
with:
name: coverage-report
path: ${{ github.workspace }}/coverage