Skip to content

Add CI pipeline (#1) #3

Add CI pipeline (#1)

Add CI pipeline (#1) #3

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
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@v4
with:
go-version: '1.21'
cache: false
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
test:
name: Test
strategy:
matrix:
go: [ '1.21.x', '1.20.x', '1.19.x', '1.18.x' ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Test
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