mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 19:44:41 +00:00
62 lines
1.1 KiB
YAML
62 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
strategy:
|
|
matrix:
|
|
go-version: ['1.24']
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
cache: true
|
|
|
|
- name: Build binary
|
|
run: go build -v -o bin/git-get ./cmd/
|
|
|
|
- name: Run tests
|
|
run: go test -race ./...
|
|
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.24'
|
|
cache: true
|
|
|
|
- name: Run lints
|
|
uses: golangci/golangci-lint-action@v8
|
|
with:
|
|
version: v2.4.0
|
|
args: --timeout=5m
|
|
|