Skip to content

chore: update CI workflow (#61) #114

chore: update CI workflow (#61)

chore: update CI workflow (#61) #114

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: run tests
jobs:
test:
strategy:
matrix:
go-version: [ "1.23", "1.24" ]
runs-on: ubuntu-latest
env:
GOLANGCI_LINT_VERSION: v2.1.6
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
id: install-go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Download dependencies
run: go mod download
if: steps.install-go.outputs.cache-hit != 'true'
- name: Run linter
uses: golangci/golangci-lint-action@v8
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: Setup gotestsum
uses: gertd/action-gotestsum@v3.0.0
with:
gotestsum_version: v1.12.0
- name: Run Tests
run: gotestsum --junitfile tests.xml --format pkgname -- -covermode=atomic -coverprofile=coverage.out -race ./...
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "tests.xml"
if: always()
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
files: coverage.out
format: golang
parallel: true
flag-name: go-${{ matrix.go-version }}
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true