Skip to content

chore(deps): update golangci/golangci-lint docker tag to v1.59 (#33) #91

chore(deps): update golangci/golangci-lint docker tag to v1.59 (#33)

chore(deps): update golangci/golangci-lint docker tag to v1.59 (#33) #91

Workflow file for this run

name: tests
on:
push:
branches: [master, main]
paths-ignore: ['**.md']
tags-ignore: ['**']
pull_request:
paths-ignore: ['**.md']
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
git-leaks:
name: GitLeaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0}
- uses: gacts/gitleaks@v1 # Action page: <https://github.com/gacts/gitleaks>
lint:
name: Golang-CI (lint)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: golangci/golangci-lint-action@v5 # Action page: <https://github.com/golangci/golangci-lint-action>
with: {skip-pkg-cache: true, skip-build-cache: true}
test:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
go: ['1.17', '1.18', '1.19', '1.20']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: gacts/setup-go-with-cache@v1
with: {go-version: '${{ matrix.go }}'}
- uses: actions/checkout@v4
with: {fetch-depth: 2} # Fixes codecov error 'Issue detecting commit SHA'
- run: go run ./examples/simple/
- if: matrix.os == 'ubuntu-latest'
run: go test -race -covermode=atomic -coverprofile ./coverage.txt ./... # -race is not supported on other OS
- if: matrix.os != 'ubuntu-latest'
run: go test -covermode=atomic -coverprofile ./coverage.txt ./...
- name: Upload Coverage report to CodeCov
continue-on-error: true
uses: codecov/codecov-action@v4 # https://github.com/codecov/codecov-action
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
fail_ci_if_error: false