Updated test workflow #13
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: "Lint and test" | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '*.md' | |
pull_request: | |
types: [ opened, synchronize ] | |
paths-ignore: | |
- '*.md' | |
branches: | |
- master | |
jobs: | |
lint: | |
name: "Run linters" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.1 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
test: | |
name: Run unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.1 | |
- name: Install dependencies and run tests | |
run: | | |
go mod download | |
go test -v ./... |