fix(deps): Update dependency go to v1.23.2 #842
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |