Skip to content

enable ci

enable ci #1

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
test:
name: Go tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: src/go.mod
cache: true
- name: Run tests via Makefile
run: make test VERBOSE=1
- name: Print coverage summary
if: always()
run: |
if [ -f build/coverage.txt ]; then
go tool cover -func=build/coverage.txt | tail -n 1
else
echo "No coverage file found"
fi
lint:
name: Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: src/go.mod
cache: true
- name: GolangCI-Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.3
working-directory: src
args: --timeout=5m