Skip to content

CI

CI #151

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 8 * * 6'
jobs:
test:
name: "Test: Go ${{ matrix.go }}"
runs-on: ubuntu-latest
strategy:
matrix:
go:
- ~1.16
- ^1.20
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Test
run: go test -v ./...
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- name: Check gofmt
run: test -z $(gofmt -l .)
- name: Check prettier
uses: creyD/[email protected]
with:
dry: true
prettier_options: --check **/*.{html,css,js}
cover:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- name: Test with Coverage
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
- uses: codecov/codecov-action@v3
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ^1.16
- name: Install dependencies
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Vet
run: go vet ./...
- name: Staticcheck
run: staticcheck -f stylish ./...