-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.65 KB
/
pull-request.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
52
53
54
55
56
57
58
59
60
name: Test PR
'on': pull_request
jobs:
install-and-test:
name: 🛠️ Install & Test
runs-on: ubuntu-latest
steps:
- name: 🗜️ Checkout
uses: actions/checkout@v4
- name: 🗜️ Setup node version
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: 🛠️ Install
uses: ./.github/actions/cached-deps
- name: 🛠️ Sync versions
run: yarn script:sync-projects
- name: 🧹 Lint
run: yarn lint
- name: 🧪 Run tests
run: npx jest --ci --json --coverage --testLocationInResults --outputFile=coverage/report.json
- name: 🧪 Create coverage report markdown
uses: ArtiomTr/jest-coverage-report-action@v2
id: coverage
with:
prnumber: ${{ steps.findPr.outputs.number }}
coverage-file: coverage/report.json
package-manager: yarn
custom-title: 🧪 Unit tests
threshold: 80
skip-step: all
output: report-markdown
- name: 💬 Create coverage report comment
uses: marocchino/sticky-pull-request-comment@v2
with:
message: ${{ steps.coverage.outputs.report }}
- name: ⬆️ Upload coverage reports
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
dry_run: true
- name: 📦 Build demo app
run: yarn build:demo --base-href https://celtian.github.io/ngx-app-version/
- name: 📦 Build ngx-app-version
run: yarn build