Skip to content

linter

linter #10

Workflow file for this run

name: CI
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25.4'
- name: Get dependencies
run: go mod tidy
- name: Run linter
run: make lint
continue-on-error: true
- name: Build
run: make build
- name: Test build artifact
run: |
chmod +x ai
echo "Binary built successfully"
build-artifacts:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25.4'
- name: Get dependencies
run: go mod tidy
- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
mkdir -p dist
if [ "${{ matrix.goos }}" = "windows" ]; then
go build -o dist/ai-${{ matrix.goos }}-${{ matrix.goarch }}.exe .
else
go build -o dist/ai-${{ matrix.goos }}-${{ matrix.goarch }} .
fi
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ai-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/
retention-days: 30