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 17:28:16 +02:00
|
|
|
branches: [master]
|
2024-07-19 08:51:03 +02:00
|
|
|
pull-request:
|
2024-07-19 17:28:16 +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
|
|
|
steps:
|
2024-07-19 17:28:16 +02:00
|
|
|
-
|
|
|
|
name: Checkout repo
|
2024-07-19 08:51:03 +02:00
|
|
|
uses: actions/checkout@v4
|
2024-07-19 17:28:16 +02:00
|
|
|
-
|
|
|
|
name: Extract Go version
|
|
|
|
id: go-version
|
|
|
|
run: |
|
|
|
|
sed '/^go /!d; s/go /version=/' go.mod >>"$GITHUB_OUTPUT"
|
|
|
|
-
|
|
|
|
name: Setup Go
|
2024-07-19 08:51:03 +02:00
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
2024-07-19 17:28:16 +02:00
|
|
|
go-version: ${{ steps.go-version.outputs.version }}
|
|
|
|
-
|
|
|
|
name: Run tests
|
2024-07-19 14:29:51 +02:00
|
|
|
run: |
|
|
|
|
make test
|