2024-03-27 20:01:10 +01:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
2024-03-27 22:48:14 +01:00
|
|
|
tags: [ "*" ]
|
2024-03-27 20:01:10 +01:00
|
|
|
pull_request:
|
|
|
|
branches: [ "master" ]
|
|
|
|
|
2024-03-27 22:17:29 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: read
|
2024-03-27 20:01:10 +01:00
|
|
|
|
2024-03-27 22:17:29 +01:00
|
|
|
jobs:
|
2024-03-27 20:01:10 +01:00
|
|
|
build:
|
2024-03-27 22:17:29 +01:00
|
|
|
strategy:
|
2024-08-25 16:00:22 +02:00
|
|
|
fail-fast: false
|
2024-03-27 22:17:29 +01:00
|
|
|
matrix:
|
2024-08-25 15:59:59 +02:00
|
|
|
go: ['1.22', '1.23']
|
2024-03-27 22:17:29 +01:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
2024-03-27 22:18:59 +01:00
|
|
|
name: build
|
2024-03-27 22:17:29 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
2024-03-27 20:01:10 +01:00
|
|
|
steps:
|
2024-03-27 22:17:29 +01:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
|
|
|
- name: Build
|
|
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
2024-03-27 22:59:32 +01:00
|
|
|
run: make test
|
2024-10-30 16:23:02 +01:00
|
|
|
coverage:
|
|
|
|
name: coverage
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [build]
|
|
|
|
steps:
|
2024-10-30 16:12:54 +01:00
|
|
|
- name: Update coverage report
|
|
|
|
uses: ncruces/go-coverage-report@v0
|
|
|
|
with:
|
|
|
|
report: true
|
|
|
|
chart: true
|
|
|
|
amend: true
|
|
|
|
if: |
|
|
|
|
github.event_name == 'push'
|
|
|
|
continue-on-error: true
|