refactor: pass context.Context to server.Start in tests for consi…
#23
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: Audit | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: go.sum | |
| - name: Run Golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.9.0 | |
| args: -v --timeout=5m --build-tags=race | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: go.sum | |
| - name: Run tests | |
| run: go test -race -v -coverprofile=keratin.txt --covermode=atomic ./... | |
| - name: Run adapter tests | |
| run: go test -race -v -coverprofile=../adapter.txt --covermode=atomic ./... | |
| working-directory: ./adapter | |
| - name: Run session tests | |
| run: go test -race -v -coverprofile=../session.txt --covermode=atomic ./... | |
| working-directory: ./session | |
| - name: Run server tests | |
| run: go test -race -v -coverprofile=../server.txt --covermode=atomic ./... | |
| working-directory: ./server | |
| - name: Run rate limit tests | |
| run: go test -race -v -coverprofile=../ratelimit.txt --covermode=atomic ./... | |
| working-directory: ./ratelimit | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| files: ./keratin.txt,./adapter.txt,./session.txt,./server.txt,./ratelimit.txt |