2024-07-19 15:43:40 +02:00
|
|
|
name: Build and test project
|
2024-07-19 08:51:03 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-07-19 15:43:40 +02:00
|
|
|
branches:
|
|
|
|
- master
|
2024-07-19 08:51:03 +02:00
|
|
|
pull-request:
|
2024-07-19 15:43:40 +02:00
|
|
|
branches:
|
|
|
|
- master
|
2024-07-19 08:51:03 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
2024-07-19 15:43:40 +02:00
|
|
|
runs-on: debian-12
|
2024-07-19 08:51:03 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-07-19 14:33:34 +02:00
|
|
|
go-version: [ '1.22' ]
|
2024-07-19 08:51:03 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2024-07-19 14:33:54 +02:00
|
|
|
- name: Setup Go
|
2024-07-19 08:51:03 +02:00
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
2024-07-19 15:43:40 +02:00
|
|
|
- name: Build for host architecture
|
2024-07-19 08:51:03 +02:00
|
|
|
run: |
|
2024-07-19 15:43:40 +02:00
|
|
|
make build
|
2024-07-19 14:29:51 +02:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
make test
|