Promise and Job Queue API Completion #1044
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
| name: Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request_target: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }} @ Go ${{ matrix.go }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| go: ['stable'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout PR code | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Build | |
| run: go build -v ./... | |
| # Linux test step | |
| - name: Test with coverage (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| go test -v -race -coverprofile=coverage.out -covermode=atomic ./... | |
| # macOS test step | |
| - name: Test with coverage (MacOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| go test -v -race -coverprofile=coverage.out -covermode=atomic ./... | |
| # Windows test step (separate to handle PowerShell issues) | |
| - name: Test with coverage (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| go test -v -race -coverprofile=coverage.out -covermode=atomic ./... | |
| shell: cmd | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6.0.1 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| files: ./coverage.out | |
| flags: ${{ matrix.os }}-go${{ matrix.go }} | |
| name: codecov-${{ matrix.os }}-go${{ matrix.go }} | |
| fail_ci_if_error: true | |
| verbose: true | |