Added style job to GH Workflow #12
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: ci | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
style: | |
name: Style | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23.0" | |
- name: Install staticcheck | |
run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: Run staticcheck | |
run: test -z $(staticcheck ./...) | |
- name: Style | |
run: test -z $(go fmt ./...) | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23.0" | |
- name: Tests & Code coverage | |
run: go test --cover ./... | |
- name: Install gosec | |
run: go install github.com/securego/gosec/v2/cmd/gosec@latest | |
- name: Check code security through gosec | |
run: gosec ./... | |