Skip to content

chore(ci): prevents duplicate workflow runs #52

chore(ci): prevents duplicate workflow runs

chore(ci): prevents duplicate workflow runs #52

Workflow file for this run

name: go test
on:
push:
tags:
- v*
branches:
- master
paths-ignore: *.md

Check failure on line 9 in .github/workflows/go-test.yml

GitHub Actions / .github/workflows/go-test.yml

Invalid workflow file

You have an error in your yaml syntax on line 9
pull_request:
paths-ignore: *.md
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
check-latest: true
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
only-new-issues: true
skip-cache: true
test:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
go_version: ['oldstable', 'stable' ]
steps:
- name: Run unit tests
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go_version }}'
check-latest: true
cache: true
- uses: actions/checkout@v4
- run: go test -v -race -coverprofile="coverage-${{ matrix.os }}.${{ matrix.go_version }}.out" -covermode=atomic -coverpkg=$(go list)/... ./...
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
files: './coverage-${{ matrix.os }}.${{ matrix.go_version }}.out'
flags: '${{ matrix.go_version }}'
os: '${{ matrix.os }}'
fail_ci_if_error: false
verbose: true