Avoid returning a zero byte count and a nil error on a Read at the en… #61
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: [push, pull_request] | |
| name: Test | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| go-version: [1.23.x] | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/.cache/go-build | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Test | |
| run: go test -short -v ./... -coverpkg "github.com/prequel-dev/plz4,github.com/prequel-dev/plz4/internal/...,github.com/prequel-dev/plz4/pkg/..." -coverprofile coverage.out | |
| - name: Upload coverage as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage.out | |
| path: coverage.out | |
| if: matrix.os == 'ubuntu-latest' | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| contents: write # This grants write access to the repository, including the Wiki. | |
| steps: | |
| - name: Download coverage artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: coverage.out | |
| path: ~/coverage.out | |
| - name: Update coverage report | |
| uses: ncruces/go-coverage-report@v0 | |
| with: | |
| report: 'true' | |
| chart: 'true' | |
| amend: 'true' | |
| coverage-file: 'coverage.out' | |
| continue-on-error: true |