Skip to content

chore: optimize GitHub Pages deployment workflow #2

chore: optimize GitHub Pages deployment workflow

chore: optimize GitHub Pages deployment workflow #2

Workflow file for this run

name: Go CI
on:
push:
branches: [main, master]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
test:
name: Test (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.22', '1.23']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Verify dependencies
run: go mod verify
- name: Build
run: go build ./...
- name: Run tests
run: go test -race -count=1 -coverprofile=coverage.out ./...
- name: Run vet
run: go vet ./...