diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 542d5a2..3396e46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,28 +4,45 @@ on: - master pull_request: name: CI + jobs: test: - name: Test + name: Test / Go ${{ matrix.go }} runs-on: ubuntu-latest + strategy: + matrix: + # These are the release channels. + # Hermit will handle installing the right patch. + go: ["1.20", "1.21"] steps: - name: Checkout code uses: actions/checkout@v4 - name: Init Hermit run: ./bin/hermit env -r >> "$GITHUB_ENV" + - name: Install Go ${{ matrix.go }} + run: | + hermit install go@"${GO_VERSION}" + go version + env: + GO_VERSION: ${{ matrix.go }} - name: Test run: go test ./... test-windows: - name: Test / Windows + name: Test / Windows / Go ${{ matrix.go }} runs-on: windows-latest + strategy: + matrix: + # These are versions for GitHub's setup-go. + # '.x' will pick the latest patch release. + go: ["1.20.x", "1.21.x"] steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: ${{ matrix.go }} - name: Test run: go test ./...