Repository navigation
152 lines (141 loc) · 4.94 KB
/
Copy pathconformance.yml
File metadata and controls
152 lines (141 loc) · 4.94 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Conformance monitoring
on:
pull_request:
types:
- opened
- labeled
- synchronize
- reopened
- ready_for_review
schedule:
- cron: '13 9 * * 1'
- cron: '43 7 1 * *'
workflow_dispatch:
inputs:
shard:
description: Standard conformance scope
required: true
type: choice
default: full
options:
- full
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
suite:
description: First-party correctness or exhaustive competitor comparison
type: choice
default: first-party
options:
- first-party
- comparison
cases:
description: Optional comma-separated case IDs for a targeted run
type: string
default: ''
permissions:
contents: read
jobs:
select:
name: Select conformance shards
if: >-
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' &&
(contains(github.event.pull_request.labels.*.name, 'full-conformance') ||
contains(github.event.pull_request.labels.*.name, 'browser-correctness')) &&
(github.event.action != 'labeled' || github.event.label.name == 'full-conformance' || github.event.label.name == 'browser-correctness'))
runs-on: ubuntu-24.04
timeout-minutes: 2
outputs:
mode: ${{ steps.selection.outputs.mode }}
shards: ${{ steps.selection.outputs.shards }}
suite: ${{ steps.selection.outputs.suite }}
steps:
- id: selection
name: Resolve scope
env:
EVENT_NAME: ${{ github.event_name }}
EVENT_SCHEDULE: ${{ github.event.schedule }}
REQUESTED_SHARD: ${{ inputs.shard }}
REQUESTED_SUITE: ${{ inputs.suite }}
REQUESTED_CASES: ${{ inputs.cases }}
FULL_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'full-conformance') }}
run: |
suite=first-party
if [ "$EVENT_SCHEDULE" = '43 7 1 * *' ] || [ "$FULL_LABEL" = true ] || [ "$REQUESTED_SUITE" = comparison ]; then
suite=comparison
fi
if [ -n "$REQUESTED_CASES" ]; then
mode=targeted
shards='[1]'
elif [ "$EVENT_NAME" = workflow_dispatch ] && [ "$REQUESTED_SHARD" != full ]; then
mode=manual
shards="[$REQUESTED_SHARD]"
elif [ "$EVENT_NAME" = schedule ]; then
mode=scheduled
shards='[1,2,3,4,5,6,7,8]'
elif [ "$EVENT_NAME" = pull_request ]; then
mode=label
shards='[1,2,3,4,5,6,7,8]'
else
mode=manual
shards='[1,2,3,4,5,6,7,8]'
fi
echo "mode=$mode" >> "$GITHUB_OUTPUT"
echo "shards=$shards" >> "$GITHUB_OUTPUT"
echo "suite=$suite" >> "$GITHUB_OUTPUT"
echo "Suite: $suite; mode: $mode; shards: $shards; revision: $GITHUB_SHA" >> "$GITHUB_STEP_SUMMARY"
conformance:
name: Conformance (${{ matrix.shard }}/8, ${{ needs.select.outputs.suite }}, ${{ needs.select.outputs.mode }})
needs: select
runs-on: ubuntu-24.04
timeout-minutes: 25
concurrency:
group: charts-conformance-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}-${{ matrix.shard }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
shard: ${{ fromJSON(needs.select.outputs.shards) }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup
uses: ./.github/actions/setup
with:
playwright: 'true'
- name: Run standard conformance shard
env:
SUITE: ${{ needs.select.outputs.suite }}
CASES: ${{ inputs.cases }}
SHARD: ${{ matrix.shard }}
run: |
args=()
if [ -z "$CASES" ]; then args+=(--shard="$SHARD/8"); fi
if [ "$SUITE" = first-party ]; then args+=(--first-party); fi
if [ -n "$CASES" ]; then args+=(--case="$CASES"); fi
pnpm conformance -- "${args[@]}"
- name: Publish conformance summary
if: success()
run: |
summaries=(.benchmark-output/conformance/results/*.md)
test -e "${summaries[0]}"
cat "${summaries[@]}" >> "$GITHUB_STEP_SUMMARY"
- name: Upload conformance
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: chart-library-conformance-${{ needs.select.outputs.mode }}-${{ matrix.shard }}-${{ github.run_id }}
path: |
.benchmark-output/conformance/results
.benchmark-output/conformance/screenshots
if-no-files-found: error
retention-days: 14