Skip to content
Merged
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
69 changes: 10 additions & 59 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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))}' <HEAD >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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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