Files
lattigo/.github/workflows/ci.yml
2025-09-02 13:39:54 +02:00

61 lines
1.3 KiB
YAML

name: CI Checks
on:
push:
pull_request:
workflow_dispatch:
jobs:
checks:
name: Run static checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-tools-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-tools
- name: Setup tools
run: make get_tools
- name: Run Makefile checks
run: make checks
tests:
name: Run Go ${{ matrix.go }} tests
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.25", "1.24", "1.23", "1.22"]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go }}-build-
- name: Build
run: go build ./...
- name: Run Makefile tests
run: make test