generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 11
/
main-push.yaml
70 lines (59 loc) · 1.75 KB
/
main-push.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: OnPushToMaster
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install Dependencies
run: npm ci
- name: Build (Nx All)
uses: mansagroup/nrwl-nx-action@v2
with:
targets: build
all: true
nxCloud: false
- name: Lint (Nx All)
uses: mansagroup/nrwl-nx-action@v2
with:
targets: lint
all: true
nxCloud: false
- name: Test with Coverage (Nx All)
uses: mansagroup/nrwl-nx-action@v2
with:
targets: test
all: true
nxCloud: false
args: '--coverage --coverageReporters=json,json-summary'
- name: Archive Code Coverage Results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: ./coverage/**/coverage-summary.json
if-no-files-found: error
- name: Create Code Coverage Badge
uses: dkhunt27/nx-code-coverage@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
no-coverage-ran: false
coverage-folder: ./coverage
coverage-base-folder: ./coverage-base
gist-processing: true
gist-token: ${{ secrets.COVERAGE_BADGES_GIST_TOKEN }}
gist-id: SOME_GIST_ID
color: green
named-logo: jest
hide-coverage-reports: false
hide-unchanged: false