Skip to content

docs(readme.md): cI badge added #2

docs(readme.md): cI badge added

docs(readme.md): cI badge added #2

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
build-lint-test:
name: build, vet, test
runs-on: ubuntu-latest
environment: dev
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: true
- name: Verify dependencies
run: |
go version
go mod verify
- name: Build
run: go build -v ./...
- name: Run go vet
run: go vet ./...
# staticcheck is part of golangci but some lints should be not enabled by default => keeping it also here
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run staticcheck
run: staticcheck ./...
- name: Run tests
run: make tests
# https://github.com/golangci/golangci-lint-action
# https://golangci-lint.run/usage/install#github-actions
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
args: "--timeout=30m --out-${NO_FUTURE}format colored-line-number"