Make all tests pass #8
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: go-lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
cache-dependency-path: go.sum | |
- name: Generate code | |
run: go generate ./... | |
working-directory: go | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
install-mode: "goinstall" | |
version: v1.59 | |
working-directory: go | |
args: --config="${GITHUB_WORKSPACE}/go/.golangci.yaml" | |
test: | |
name: go-test | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: go | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
cache-dependency-path: go.sum | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Generate code | |
run: go generate ./... | |
- name: Compile | |
run: go build -v ./... | |
- name: Run tests | |
run: go test -v ./... | |
benchmark: | |
name: go-test | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: go | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
cache-dependency-path: go.sum | |
- name: Run benchmark | |
run: go test cmd/glox -bench=. -count 5 -run=^# | tee output.txt | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
tool: 'go' | |
output-file-path: output.txt |