Skip to content

CI: add triggers for the CI on pull_request and on workflow_dispatch #1779

CI: add triggers for the CI on pull_request and on workflow_dispatch

CI: add triggers for the CI on pull_request and on workflow_dispatch #1779

Workflow file for this run

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.23.5'
- 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.23.5', '1.22.11', '1.21.13']
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