Skip to content

Merge pull request #86 from staticdev/dependabot/github_actions/relea… #259

Merge pull request #86 from staticdev/dependabot/github_actions/relea…

Merge pull request #86 from staticdev/dependabot/github_actions/relea… #259

Workflow file for this run

---
name: Tests
"on":
- push
- pull_request
jobs:
lint:
permissions:
contents: read
pull-requests: read
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
with:
version: v1.45.0
args: --timeout=3m
skip-go-installation: true
tests:
name: tests ${{ matrix.go }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { go: "1.18", os: "ubuntu-latest" }
- { go: "1.18", os: "macos-latest" }
- { go: "1.18", os: "windows-latest" }
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Run tests
run: go test -v ./...
coverage:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.18"
- name: Run coverage
run: go test ./... -failfast -race -coverprofile=coverage.out -covermode=atomic
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)