diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..46e2b22d --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,26 @@ +name: Build +permissions: + contents: read +on: + push: + branches: + - main + pull_request: + +jobs: + build: + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, windows-latest] + arch: [amd64, arm64] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 + with: + go-version: 1.24.x + - name: build + env: + GOARCH: ${{ matrix.arch }} + run: make build diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index acd6eb72..82cbc7b1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,27 +10,15 @@ on: jobs: test: strategy: + fail-fast: false matrix: - platform: [ubuntu-latest] + platform: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 with: go-version: 1.24.x - - name: set env vars - run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - with: - fetch-depth: 0 - - name: cache go binaries - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - id: cache-go-bin - with: - path: ~/go/bin - key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} - restore-keys: ${{ runner.os }}-go-bin - - name: Lint - run: make lint - name: test run: make test diff --git a/third_party/ecpsigner/windows/ncrypt/cert_util_test.go b/third_party/ecpsigner/windows/ncrypt/cert_util_test.go index 96ef40ac..3251b027 100644 --- a/third_party/ecpsigner/windows/ncrypt/cert_util_test.go +++ b/third_party/ecpsigner/windows/ncrypt/cert_util_test.go @@ -17,11 +17,15 @@ package ncrypt import ( + "crypto/x509" "testing" ) func TestCredProviderNotSupported(t *testing.T) { - _, err := Cred("issuer", "store", "unsupported_provider") + _, err := Cred( + [][]byte{[]byte("issuer")}, + func(c *x509.Certificate) bool { return true }, + "store", "unsupported_provider") if err == nil { t.Errorf("Expected error, but got nil.") }