-
Notifications
You must be signed in to change notification settings - Fork 12
84 lines (71 loc) · 2.01 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Pull Request
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- converted_to_draft
branches:
- main
concurrency:
group: ci-tests-${{ github.ref }}-1
cancel-in-progress: true
jobs:
deps-cache:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- uses: actions/cache@v3
id: cache
with:
path: node_modules/
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v3
id: build_cache
with:
path: dist/
key: ${{ runner.os }}-dist-${{ hashFiles('libs/**/*.*') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build
if: steps.build_cache.outputs.cache-hit != 'true'
run: npx nx run components:build --skip-nx-cache && npx nx reset
call-lint:
if: github.event.pull_request.draft == false
needs: [deps-cache]
uses: ./.github/workflows/_lint.yml
unit-tests:
if: github.event.pull_request.draft == false
needs: call-lint
uses: ./.github/workflows/_unit-test.yml
with:
os: ubuntu-latest
report_coverage: true
upload-coverage:
if: github.event.pull_request.draft == false
needs: unit-tests
uses: ./.github/workflows/_upload-coverage.yml
with:
os: ubuntu-latest
call-visual-regression:
if: github.event.pull_request.draft == false
needs: call-lint
uses: ./.github/workflows/_visual-regression.yml
call-deploy-deno-preview:
if: github.event.pull_request.draft == false
needs: [deps-cache]
uses: ./.github/workflows/_deploy-deno.yml
call-lighthouse:
if: github.event.pull_request.draft == false
needs: [deps-cache]
uses: ./.github/workflows/_lighthouse.yml