Increase Performance #26
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
| name: Test | |
| on: | |
| push: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| test: | |
| permissions: | |
| contents: read | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Checkout codebase | |
| uses: actions/checkout@v4.2.2 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5.4.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| check-latest: true | |
| - name: Cleanup old coverage files | |
| shell: bash | |
| run: | | |
| rm -f coverage.txt || true # For all operating systems | |
| - name: Install dependencies | |
| shell: bash | |
| run: go mod tidy | |
| - name: Run Tests | |
| shell: bash | |
| run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... | |
| - name: Upload Coverage | |
| uses: codecov/codecov-action@v5.4.2 | |
| if: success() | |
| security: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| - run: | | |
| go install github.com/securego/gosec/v2/cmd/gosec@latest | |
| export PATH="$PATH:$(go env GOPATH)/bin" | |
| gosec ./... | |
| - name: Test | |
| run: go test -timeout 1h -v ./... |