Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 0 additions & 60 deletions .circleci/config.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ jobs:
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
# On PRs we only verify the build doesn't break; arm/arm64 under QEMU
# is ~5-8x slower and adds no signal there. Multi-arch on push/tag.
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm/v7,linux/arm64' }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
build-args: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
platforms: linux/amd64
push: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
tags: ghcr.io/nuts-foundation/nuts-node-ci:${{ env.SHA }}
cache-from: type=gha,scope=e2e
cache-to: type=gha,scope=e2e,mode=max
secrets: |
GIT_AUTH_TOKEN=${{ secrets.PACKAGE_SECRET }}

Expand All @@ -65,6 +67,8 @@ jobs:
platforms: linux/amd64
push: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
tags: ghcr.io/nuts-foundation/nuts-node-ci:${{ env.SHA }}
cache-from: type=gha,scope=e2e
cache-to: type=gha,scope=e2e,mode=max

- name: Run E2E tests
run: |
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 'Go test'

on:
push:
branches:
- 'master'
- 'V*'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'

- name: Test
run: go test ./... -race -coverprofile=c_raw.out

- name: Filter coverage
run: grep -v generated c_raw.out | grep -v mock | grep -v test > c.out

- name: Upload coverage to Qlty
# Skip on PRs from forks: GitHub does not grant id-token: write to
# cross-repository workflow runs, so the OIDC upload cannot authenticate.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
uses: qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899 # v2.2.0
with:
oidc: true
files: c.out
format: coverprofile
1 change: 0 additions & 1 deletion crypto/storage/vault/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ func TestNewVaultKVStorage(t *testing.T) {
t.Run("error - wrong URL", func(t *testing.T) {
storage, err := NewVaultKVStorage(Config{Address: "http://non-existing"})
require.Error(t, err)
assert.Regexp(t, `no such host|Temporary failure in name resolution`, err.Error())
assert.Nil(t, storage)
})
}
Expand Down
6 changes: 3 additions & 3 deletions didman/api/v1/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func TestHTTPClient_AddEndpoint(t *testing.T) {
Address: "not_an_address", Timeout: time.Second},
}
endpoint, err := c.AddEndpoint("abc", "type", "some-url")
assert.Regexp(t, `no such host|Temporary failure in name resolution`, err.Error())
assert.Error(t, err)
assert.Nil(t, endpoint)
})
}
Expand All @@ -139,7 +139,7 @@ func TestHTTPClient_DeleteEndpointsByType(t *testing.T) {
Address: "not_an_address", Timeout: time.Second},
}
err := c.DeleteEndpointsByType("did:nuts:123", "eOverdracht")
assert.Regexp(t, `no such host|Temporary failure in name resolution`, err.Error())
assert.Error(t, err)
})
}

Expand Down Expand Up @@ -228,7 +228,7 @@ func TestHTTPClient_GetCompoundServices(t *testing.T) {
Address: "not_an_address", Timeout: time.Second},
}
res, err := c.GetCompoundServices("did:nuts:123")
assert.Regexp(t, `no such host|Temporary failure in name resolution`, err.Error())
assert.Error(t, err)
assert.Nil(t, res)
})

Expand Down
Loading