Add wrappers for struct, http.Request, http.Response #122
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: Go Test and Benchmark | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
# Required: allow read access to the content for analysis. | |
contents: read | |
# Optional: allow read access to pull request. Use with `only-new-issues` option. | |
pull-requests: read | |
# Optional: allow write access to checks to allow the action to annotate code in the PR. | |
checks: write | |
jobs: | |
linter: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
- name: Run linter | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: latest | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
- name: Run tests with coverage | |
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./... | |
- name: Check tests coverage | |
uses: vladopajic/go-test-coverage@v2 | |
with: | |
config: ./.testcoverage.yml | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
- name: Run benchmarks | |
run: go test -bench=. ./... |