Skip to content

Commit 1dcf2d2

Browse files
ci: add baseline + compat-conformance workflow
withings-export-cli did not have a CI workflow for `go vet` / `go test` or for the compat-test bundle from quantcli/common. Adding the same two-job shape used by crono-export-cli (PR quantcli/crono-export-cli#31): a `go` job that runs `go vet` and `go test` on every PR, and a `compat` job that builds the binary, points WITHINGS_EXPORT_BIN at it, and runs `go test -tags=compat -run TestContractFormats ./...` against the common-module §4 bundle. Co-Authored-By: Paperclip <[email protected]>
1 parent 523320e commit 1dcf2d2

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
go:
14+
name: go vet + test
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-go@v5
19+
with:
20+
go-version-file: go.mod
21+
cache: true
22+
- name: go vet
23+
run: go vet ./...
24+
- name: go test
25+
run: go test ./...
26+
27+
compat:
28+
name: compat (CONTRACT machine-attestation)
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-go@v5
33+
with:
34+
go-version-file: go.mod
35+
cache: true
36+
- name: resolve compat dependency
37+
# The compat module lives at github.com/quantcli/common/compat
38+
# under a subpath. `go mod tidy` materializes go.sum for it on
39+
# first run; subsequent runs are cache-served.
40+
run: go mod tidy
41+
- name: build withings-export
42+
run: go build -o /tmp/withings-export .
43+
- name: run compat suite
44+
env:
45+
# Path the compat-tagged test reads from os.Getenv.
46+
WITHINGS_EXPORT_BIN: /tmp/withings-export
47+
run: go test -tags=compat -run TestContractFormats ./...

0 commit comments

Comments
 (0)