Skip to content

Commit 8e82a0d

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 2c0e0c5 + c1829fd commit 8e82a0d

File tree

13 files changed

+16324
-1093
lines changed

13 files changed

+16324
-1093
lines changed

.github/workflows/default.yml

+80-13
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,22 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020

21-
# - uses: actions/setup-go@v5
22-
- uses: erezrokah/setup-go@feat/add_cache_prefix
21+
- uses: actions/setup-go@v5
2322
with:
2423
go-version: ${{ env.GO_VERSION }}
25-
cache-key-prefix: clean-cache-
24+
cache: false
2625
id: go
2726

27+
- uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cache/go-build
31+
~/go/pkg/mod
32+
key: ${{ runner.os }}-go-clean-${{ hashFiles('**/go.sum') }}
33+
restore-keys: |
34+
${{ runner.os }}-go-clean-
35+
${{ runner.os }}-go-
36+
2837
- name: Install tools
2938
run: make install
3039

@@ -47,12 +56,22 @@ jobs:
4756
steps:
4857
- uses: actions/checkout@v4
4958

50-
- uses: erezrokah/setup-go@feat/add_cache_prefix
59+
- uses: actions/setup-go@v5
5160
with:
5261
go-version: ${{ env.GO_VERSION }}
53-
cache-key-prefix: build-cache-
62+
cache: false
5463
id: go
5564

65+
- uses: actions/cache@v4
66+
with:
67+
path: |
68+
~/.cache/go-build
69+
~/go/pkg/mod
70+
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
71+
restore-keys: |
72+
${{ runner.os }}-go-build-
73+
${{ runner.os }}-go-
74+
5675
- uses: actions/setup-node@v4
5776
with:
5877
node-version: "18"
@@ -70,13 +89,22 @@ jobs:
7089
steps:
7190
- uses: actions/checkout@v4
7291

73-
# - uses: actions/setup-go@v5
74-
- uses: erezrokah/setup-go@feat/add_cache_prefix
92+
- uses: actions/setup-go@v5
7593
with:
7694
go-version: ${{ env.GO_VERSION }}
77-
cache-key-prefix: test-cache-
95+
cache: false
7896
id: go
7997

98+
- uses: actions/cache@v4
99+
with:
100+
path: |
101+
~/.cache/go-build
102+
~/go/pkg/mod
103+
key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }}
104+
restore-keys: |
105+
${{ runner.os }}-go-test-
106+
${{ runner.os }}-go-
107+
80108
- name: Test
81109
run: mkdir dist && touch dist/empty && make test
82110

@@ -93,12 +121,24 @@ jobs:
93121
cache: false # avoid cache thrashing
94122
id: go
95123

124+
- uses: actions/cache@v4
125+
with:
126+
path: |
127+
~/.cache/go-build
128+
~/go/pkg/mod
129+
key: ${{ runner.os }}-go-lint-${{ hashFiles('**/go.sum') }}
130+
restore-keys: |
131+
${{ runner.os }}-go-lint-
132+
${{ runner.os }}-go-
133+
96134
- run: mkdir dist && touch dist/empty
97135

98136
- name: Lint
99137
uses: golangci/golangci-lint-action@v4
100138
with:
101139
version: latest
140+
skip-pkg-cache: true
141+
skip-build-cache: true
102142
args: --out-format=colored-line-number --timeout 5m
103143

104144
ui:
@@ -139,16 +179,31 @@ jobs:
139179
integration:
140180
name: Integration
141181
runs-on: ubuntu-latest
182+
strategy:
183+
fail-fast: false
184+
matrix:
185+
shardIndex: [1, 2]
186+
shardTotal: [2]
142187

143188
steps:
144189
- uses: actions/checkout@v4
145190

146-
- uses: erezrokah/setup-go@feat/add_cache_prefix
191+
- uses: actions/setup-go@v5
147192
with:
148193
go-version: ${{ env.GO_VERSION }}
149-
cache-key-prefix: integration-cache-
194+
cache: false
150195
id: go
151196

197+
- uses: actions/cache@v4
198+
with:
199+
path: |
200+
~/.cache/go-build
201+
~/go/pkg/mod
202+
key: ${{ runner.os }}-go-integration-${{ hashFiles('**/go.sum') }}
203+
restore-keys: |
204+
${{ runner.os }}-go-integration-
205+
${{ runner.os }}-go-
206+
152207
- uses: actions/setup-node@v4
153208
with:
154209
node-version: "18"
@@ -160,15 +215,27 @@ jobs:
160215
- name: Build Go
161216
run: make build
162217

218+
- uses: actions/cache@v4
219+
id: playwright-cache
220+
with:
221+
path: |
222+
~/.cache/ms-playwright
223+
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}
224+
163225
- name: Install playwright
164226
run: npx playwright install --with-deps chromium
165227

166228
- name: Run tests
167-
run: npx playwright test
229+
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
230+
231+
# - name: Run tests
232+
# uses: docker://mcr.microsoft.com/playwright:v1.34.3-jammy
233+
# with:
234+
# args: npx playwright test
168235

169236
- uses: actions/upload-artifact@v4
170-
if: always()
237+
if: ${{ !cancelled() }}
171238
with:
172-
name: playwright-report
239+
name: playwright-report-${{ matrix.shardIndex }}
173240
path: playwright-report/
174241
retention-days: 14

.github/workflows/docs-issue.yml

+20-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
11
name: Create Documentation Issue
22

33
on:
4-
pull_request:
5-
types: [labeled]
4+
pull_request_target:
5+
types: [closed]
6+
branches: [master]
67

78
jobs:
89
check-label-and-create-issue:
910
runs-on: ubuntu-latest
10-
if: github.event.label.name == 'needs documentation'
11+
if: github.event.pull_request.merged == true
1112
steps:
13+
- name: Check for 'needs documentation' label
14+
id: check-label
15+
uses: actions/github-script@v7
16+
with:
17+
github-token: ${{ secrets.GH_TOKEN }}
18+
script: |
19+
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
20+
owner: context.repo.owner,
21+
repo: context.repo.repo,
22+
issue_number: context.issue.number
23+
});
24+
const hasLabel = labels.some(label => label.name === 'needs documentation');
25+
return hasLabel;
26+
result-encoding: string
27+
1228
- name: Create Docs Issue
29+
if: steps.check-label.outputs.result == 'true'
1330
uses: actions/github-script@v7
1431
with:
1532
github-token: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)