fix(testing): Comply with given TimePrecision #3781
Workflow file for this run
This file contains 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: "Unit tests" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
unitests: | |
strategy: | |
matrix: | |
os: [large-ubuntu-plugin-sdk, large-windows-plugin-sdk, macos-latest] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- run: go mod download | |
- run: go build ./... | |
- name: Run tests | |
if: matrix.os != 'large-ubuntu-plugin-sdk' | |
run: go test -tags=assert -race ./... | |
- name: Run tests | |
if: matrix.os == 'large-ubuntu-plugin-sdk' | |
run: go test -tags=assert -race -coverprofile=coverage.out ./... | |
- name: Run benchmark | |
if: matrix.os == 'large-ubuntu-plugin-sdk' | |
run: make benchmark-ci | |
- name: Save PR number | |
if: matrix.os == 'large-ubuntu-plugin-sdk' && github.event_name == 'pull_request' | |
run: echo ${{ github.event.number }} > ./pr_number | |
- name: Upload deltas | |
if: matrix.os == 'large-ubuntu-plugin-sdk' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: delta-action-benchmarks | |
retention-days: 7 | |
path: | | |
.delta.* | |
pr_number | |
- name: Generate coverage report | |
if: always() && matrix.os == 'large-ubuntu-plugin-sdk' | |
run: go test -race -coverprofile=coverage.out -covermode=atomic ./... | |
- name: Upload coverage to Codecov | |
if: always() && matrix.os == 'large-ubuntu-plugin-sdk' | |
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d |