diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml new file mode 100644 index 0000000..232775d --- /dev/null +++ b/.github/workflows/go-check.yml @@ -0,0 +1,18 @@ +name: Go Checks + +on: + pull_request: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }} + cancel-in-progress: true + +jobs: + go-check: + uses: ipdxco/unified-github-workflows/.github/workflows/go-check.yml@v1.0 diff --git a/.github/workflows/go-test-config.json b/.github/workflows/go-test-config.json new file mode 100644 index 0000000..abfb8f9 --- /dev/null +++ b/.github/workflows/go-test-config.json @@ -0,0 +1,4 @@ +{ + "skip32bit": true, + "skipOSes": ["windows"] +} diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..a22096f --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,22 @@ +name: Go Test + +on: + pull_request: + push: + branches: ['main'] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }} + cancel-in-progress: true + +jobs: + go-test: + uses: ipdxco/unified-github-workflows/.github/workflows/go-test.yml@v1.0 + with: + go-versions: '["this"]' + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/ucan/proof_chain_test.go b/ucan/proof_chain_test.go index c28f13b..a429509 100644 --- a/ucan/proof_chain_test.go +++ b/ucan/proof_chain_test.go @@ -44,15 +44,6 @@ func (f *memLister) List(ctx context.Context, aud ucan.Principal, cmd ucan.Comma } } -// erroringLister yields a single error from the iterator. -type erroringLister struct{ err error } - -func (f *erroringLister) List(ctx context.Context, aud ucan.Principal, cmd ucan.Command, sub ucan.Subject) iter.Seq2[ucan.Delegation, error] { - return func(yield func(ucan.Delegation, error) bool) { - yield(nil, f.err) - } -} - func assertChain(t *testing.T, proofs []ucan.Delegation, links []ucan.Link, want []ucan.Delegation) { t.Helper() require.Len(t, proofs, len(want), "proof chain length")