Skip to content

Commit a514bd7

Browse files
authored
feat: add CI config (#12)
I realised we have tests here that are not being run. This PR adds the CI config we had in `go-libstoracha`.
1 parent f7a12ae commit a514bd7

4 files changed

Lines changed: 44 additions & 9 deletions

File tree

.github/workflows/go-check.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Go Checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["main"]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
go-check:
18+
uses: ipdxco/unified-github-workflows/.github/workflows/go-check.yml@v1.0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"skip32bit": true,
3+
"skipOSes": ["windows"]
4+
}

.github/workflows/go-test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Go Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ['main']
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
go-test:
18+
uses: ipdxco/unified-github-workflows/.github/workflows/go-test.yml@v1.0
19+
with:
20+
go-versions: '["this"]'
21+
secrets:
22+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

ucan/proof_chain_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,6 @@ func (f *memLister) List(ctx context.Context, aud ucan.Principal, cmd ucan.Comma
4444
}
4545
}
4646

47-
// erroringLister yields a single error from the iterator.
48-
type erroringLister struct{ err error }
49-
50-
func (f *erroringLister) List(ctx context.Context, aud ucan.Principal, cmd ucan.Command, sub ucan.Subject) iter.Seq2[ucan.Delegation, error] {
51-
return func(yield func(ucan.Delegation, error) bool) {
52-
yield(nil, f.err)
53-
}
54-
}
55-
5647
func assertChain(t *testing.T, proofs []ucan.Delegation, links []ucan.Link, want []ucan.Delegation) {
5748
t.Helper()
5849
require.Len(t, proofs, len(want), "proof chain length")

0 commit comments

Comments
 (0)