chore: add ci.yaml

This commit is contained in:
2025-08-15 17:46:31 +03:00
committed by GitHub
parent a5d1c7eb9a
commit 548a4f7c8c

43
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: CI
on:
push:
branches: [ "**" ]
pull_request:
permissions: read-all
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Cache Go build
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: go-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
go-${{ runner.os }}-
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --version
- name: Lint
run: golangci-lint run
- name: Test
run: go test ./... -race -coverprofile=coverage.out