1
0
mirror of https://github.com/rs/zerolog synced 2026-06-08 17:13:30 +00:00
Files
rs-zerolog/.github/workflows/test.yml
T
Olivier Poitrey 13966551e7 Bump CI Go matrix minimum from 1.21 to 1.23
go.mod requires go >= 1.23 and the codebase uses Go 1.22+ features
(log/slog, range-over-integer), so Go 1.21 CI jobs cannot pass.
2026-03-27 20:13:06 +01:00

37 lines
929 B
YAML

on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.23.x, 1.24.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v6
- uses: actions/cache@v5
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: go test -race -bench . -benchmem ./...
- name: Test CBOR
run: go test -tags binary_log -race ./...
coverage:
runs-on: ubuntu-latest
steps:
- name: Update coverage report
uses: ncruces/go-coverage-report@main
with:
report: 'true'
chart: 'true'
amend: 'true'
continue-on-error: true