diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4fadf67..50dc5ed 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -10,16 +10,27 @@ jobs: build: runs-on: ubuntu-latest + + strategy: + matrix: + go-version: [ '1.18', '1.21', '1.22.x' ] + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + + - name: Setup + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.20' + - name: Build + run: go build -v ./... - - name: Build - run: go build -v ./... + - name: Test + run: go test -json ./... > TestResults-${{ matrix.go-version }}.json - - name: Test - run: go test -v ./... + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: Go-results-${{ matrix.go-version }} + path: TestResults-${{ matrix.go-version }}.json