Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: add step to install Go dependencies #948

Merged
merged 9 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
name: Go tests
run-name: Running tests
name: Go checks

on: [push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23

- name: Install dependencies
run: go mod download

- name: Generate mocks
run: make generate

- name: Run vet
run: make vet
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also run vet first since it's fast.


- name: Run staticcheck
env:
SC_VERSION: "2024.1.1"
run: |
make generate
SC_URL="https://github.com/dominikh/go-tools/releases/download/$SC_VERSION/staticcheck_linux_amd64.tar.gz"
wget -q ${SC_URL} -O - | tar -xzf - --strip-components 1 -C /usr/local/bin staticcheck/staticcheck
make static
- name: Run vet
run: make vet

- name: Run tests + race condition check
run: make race

- name: Check Go files are properly formatted
run: test -z $(gofmt -l .)
Loading