diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b624b15..2a6ddcc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -15,26 +15,34 @@ jobs: uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} + # You can test your matrix by printing the current Go version - name: Display Go version run: go version - - uses: actions/checkout@v4 - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '1.22.3' + - name: Clean Go module cache + run: go clean -modcache + + - name: Remove go.sum + run: rm go.sum + + - name: Tidy up Go modules + run: go mod tidy + - name: Install dependencies - run: | - go get . + run: go get -u ./... + - name: Build run: go build -v ./... + - name: Test with the Go CLI run: go test -v ./... + - name: Test with Go run: go test -json > TestResults-${{ matrix.go-version }}.json + - name: Upload Go test results uses: actions/upload-artifact@v3 with: name: Go-results-${{ matrix.go-version }} - path: TestResults-${{ matrix.go-version }}.json \ No newline at end of file + path: TestResults-${{ matrix.go-version }}.json \ No newline at end of file