diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 19f7966a..96ae1f17 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -4,68 +4,19 @@ on: [push, pull_request] jobs: test: name: Test - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - go: - - "1.5" - - "1.6" - - "1.7" - - "1.8" - - "1.9" - - "1.10" - - "1.11" - - "1.12" - - "1.13" - - "1.14" - - "1.15" - - "1.16.0-beta1" - - "tip" - env: - GOPATH: ${{ github.workspace }}/go + runs-on: ubuntu-latest steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - with: - path: ${{ github.workspace }}/go/src/gopkg.in/yaml.v3 - - name: Set up Go ${{ matrix.go }} - if: matrix.go != 'tip' - uses: actions/setup-go@v2 + - uses: actions/checkout@v7 + - uses: actions/setup-go@v6 with: - go-version: ${{ matrix.go }} - stable: false - - name: Set up Go ${{ matrix.go }} - if: matrix.go == 'tip' - run: | - export GOROOT_BOOTSTRAP=`go env GOROOT` - export GOROOT=$HOME/gotip - mkdir $HOME/gotip - cd $HOME/gotip - - curl -s 'https://go.googlesource.com/go/+/refs/heads/master?format=JSON' | awk '/"commit"/{print substr($2,2,40);exit}' >HEAD - awk '{printf("gotip-%s",substr($0,0,7))}' VERSION - - curl -s -o go.tar.gz https://go.googlesource.com/go/+archive/`cat HEAD`.tar.gz - tar xfz go.tar.gz - - cd src - bash make.bash - - echo "GOROOT=$GOROOT" >> $GITHUB_ENV - echo "$GOROOT/bin" >> $GITHUB_PATH - - run: go version - - run: go get -t ./... - working-directory: ${{ github.workspace }}/go/src/gopkg.in/yaml.v3 - - run: go test . - working-directory: ${{ github.workspace }}/go/src/gopkg.in/yaml.v3 + go-version: stable + - run: go test -race ./... - # The matrix above runs in GOPATH mode across pre-module Go versions, so it - # can't check the module lockfile. This job verifies, on modern Go, that the - # committed go.sum is complete and the cached modules are untampered -- so a - # go.mod pinned to a release tag can't ship with only a pseudo-version (or a - # missing entry) in go.sum, which fails a clean -mod=readonly build but is - # invisible to a CI that runs `go mod download`/`go get` before testing. + # Verify the module lockfile: the committed go.sum must be complete (git diff + # after download) and the cached modules must match their checksums (go mod + # verify) -- so a go.mod pinned to a release tag can't ship with only a + # pseudo-version (or a missing entry) in go.sum, which fails a clean + # -mod=readonly build but is invisible to a CI that downloads before testing. modules: name: Verify modules runs-on: ubuntu-latest diff --git a/go.mod b/go.mod index 592873a4..51d674b6 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ module github.com/oasdiff/yaml3 -go 1.22.5 +go 1.25 require gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405