mirror of
https://github.com/lunchcat/sif.git
synced 2026-03-12 21:23:04 -07:00
go.mod requires >= 1.24.2 so the 1.23 matrix entry was already dead. setup-go v6 sets GOTOOLCHAIN=local which makes it fail explicitly.
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
name: go
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: set up go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "1.24"
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v6
|
|
with:
|
|
version: latest
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go-version: ["1.24"]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: set up go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: build
|
|
run: make
|
|
- name: run tests with coverage
|
|
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
|
|
- name: upload coverage to codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
files: ./coverage.out
|
|
fail_ci_if_error: false
|