-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.76 KB
/
Copy pathexamples.yml
File metadata and controls
50 lines (41 loc) · 1.76 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
# Every example is checked, not just written down: `rig stack wire` has to
# reproduce the file committed beside it, and the app has to build against the
# result. An example that stops working fails here rather than wasting an
# afternoon of somebody else's time.
name: examples
on:
push:
branches: [main]
pull_request:
schedule:
# rig moves; these examples should fail when it changes under them, not the
# next time somebody happens to try one.
- cron: "0 6 * * 1"
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.x"
- name: Install rig
# Pinned, so a failure here means an example broke rather than that rig
# moved this morning. The weekly run below is the one that catches drift:
# bump this when a release changes what `stack wire` writes, and the diff
# in that same commit says what changed.
run: go install github.com/rigsmith/rigsmith/cmd/rig@v1.10.0
- name: dotnet — wire reproduces the committed overlay
run: ./scripts/check-example.sh dotnet Directory.Build.targets
- name: dotnet — the app builds against the redirected sources
run: dotnet build dotnet/app/src/Term.App/Term.App.csproj
- name: go — wire reproduces the committed go.work
run: ./scripts/check-example.sh go go.work
- name: go — the app builds with the proxy off
# Only a local resolution can succeed here, so this is the assertion
# that the redirect actually took effect rather than merely existing.
working-directory: go/app
run: GOPROXY=off go build ./...