From 3494cd2786b251a3b83687e68ad314ab1945dd1f Mon Sep 17 00:00:00 2001 From: Eric Chiang Date: Wed, 22 Jan 2025 17:27:56 +0000 Subject: [PATCH] fix up v2 CI There are some awkward issues with go modules here, since newer versions of the Go tool require a go.mod file, but in the past we broke users by adding one: https://github.com/coreos/go-oidc/issues/230 --- .github/workflows/test.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..7d779f8c --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,30 @@ +name: test +on: + push: + branches: + - v2 + pull_request: + branches: + - v2 + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + go: ['1.22', '1.23'] + name: Linux Go ${{ matrix.go }} + steps: + - uses: actions/checkout@v4 + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + # For awkward reasons we can't actually add a go.mod file for the v2 + # branch, because Go enforces that a "v2.x.x" tag has a "v2" prefix. + # + # https://github.com/coreos/go-oidc/issues/230 + - name: Setup go module + run: go mod init github.com/coreos/go-oidc + - name: Test + run: go test -v ./...