-
Notifications
You must be signed in to change notification settings - Fork 1
134 lines (113 loc) · 3.58 KB
/
Copy pathchecks.yaml
File metadata and controls
134 lines (113 loc) · 3.58 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Pull Request Checks
on: pull_request
permissions:
id-token: write
contents: read
pull-requests: write
statuses: write
issues: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
danger-lint-unit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
action:
[
{ command: "npm exec danger ci", name: "Danger" },
{ command: "npm run lint", name: "Lint" },
{ command: "npm run test:unit", name: "Unit Tests" }
]
name: ${{ matrix.action.name }}
steps:
- name: Checkout git folder
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
sparse-checkout: |
.git/**
sparse-checkout-cone-mode: false
- name: Workaround actions/checkout#1475
run: git config core.sparseCheckout false
shell: bash
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
uses: ./.github/actions/setup-node
- run: ${{ matrix.action.command }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
automation-test:
name: Automation Tests
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
type: ["next", "serve", "express"]
runner: [ubuntu-latest, windows-latest]
steps:
- name: Checkout git folder
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
sparse-checkout: |
.git/**
sparse-checkout-cone-mode: false
- name: Workaround actions/checkout#1475
run: git config core.sparseCheckout false
shell: bash
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Avoid dpkg Interruption Errors
if: runner.os != 'Windows'
run: sudo dpkg --configure -a
- name: Run automation tests
run: npm run test:${{ matrix.type }}
working-directory: ./test/automation
- name: Upload results for shard
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: blob-report-${{ matrix.type }}-${{ runner.os }}
path: ./examples/${{ matrix.type }}/blob-report
retention-days: 1
merge-automation-test-reports:
name: Merge Automation Test Reports
if: ${{ !cancelled() }}
needs: [automation-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
sparse-checkout: |
package.json
package-lock.json
.nvmrc
.github/**
sparse-checkout-cone-mode: false
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: Merge into HTML Report
run: npx playwright merge-reports --reporter=html ./all-blob-reports
- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 30