Skip to content

CI updates (#4)

CI updates (#4) #12

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
tags:
- '*'
paths-ignore:
- '**.md'
pull_request:
branches:
- main
paths-ignore:
- '**.md'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version: '1.22'
check-latest: true
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
test:
name: Test
strategy:
matrix:
go: [ '1.22.x', '1.21.x', '1.20.x', '1.19.x', '1.18.x' ]
os: [ ubuntu-latest ]
include:
- go: '1.22.x'
go_experiment: 'nocoverageredesign'
- go: '1.21.x'
go_experiment: ''
- go: '1.20.x'
go_experiment: ''
- go: '1.19.x'
go_experiment: ''
- go: '1.18.x'
go_experiment: ''
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Test
env:
GOEXPERIMENT: ${{ matrix.go_experiment }}
run: go test ./... -v -race -coverprofile=./cover.out
- name: Check Test Coverage
uses: vladopajic/go-test-coverage@v2
with:
profile: cover.out
local-prefix: github.com/brunomvsouza/singleflight
threshold-file: 70
threshold-package: 70
threshold-total: 94