Skip to content

chore(main): Release v0.3.20 #903

chore(main): Release v0.3.20

chore(main): Release v0.3.20 #903

Workflow file for this run

name: "Unit tests"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unitests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set git to use LF # https://github.com/actions/checkout/issues/135
if: matrix.os == 'windows-latest'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- run: go mod download
- run: go build ./...
- name: Run tests
if: matrix.os != 'ubuntu-latest'
run: go test -race ./...
- name: Run tests
if: matrix.os == 'ubuntu-latest'
run: go test -race -coverprofile=coverage.out ./...
- name: Generate coverage report
if: always() && matrix.os == 'ubuntu-latest'
run: go tool cover -html coverage.out -o coverage.html
- uses: actions/upload-artifact@v4
if: always() && matrix.os == 'ubuntu-latest'
with:
name: Code coverage
path: coverage.html