mirror of
https://github.com/Crocmagnon/fatcontext.git
synced 2024-11-15 20:53:59 +01:00
49 lines
1 KiB
YAML
49 lines
1 KiB
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
tags: [ "*" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go: ['1.22', '1.23']
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
name: build
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
- name: Build
|
|
run: go build -v ./...
|
|
- name: Test
|
|
run: make test
|
|
coverage:
|
|
name: coverage
|
|
permissions:
|
|
contents: write
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
steps:
|
|
- name: Update coverage report
|
|
uses: ncruces/go-coverage-report@v0
|
|
with:
|
|
report: true
|
|
chart: true
|
|
amend: true
|
|
if: |
|
|
matrix.os == 'ubuntu-latest' &&
|
|
matrix.go == '1.23' &&
|
|
github.event_name == 'push'
|
|
continue-on-error: true
|