Skip to content

Merge pull request #4 from HackStrix/feature/github-actions-ci #3

Merge pull request #4 from HackStrix/feature/github-actions-ci

Merge pull request #4 from HackStrix/feature/github-actions-ci #3

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ "1.21.x", "1.22.x", "1.23.x", "1.24.x", "1.25.x", "1.26.x"]
steps:
- uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Verify dependencies
run: go mod verify
- name: Build
run: go build -v ./...
- name: Run tests with race detector
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
lint:
name: Lint Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21.x"
cache: false # golangci-lint-action handles its own caching
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=5m