2024-01-15 15:14:54 +01:00
|
|
|
name: Tests
|
2023-06-21 23:29:41 +02:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
2023-10-19 20:19:59 +02:00
|
|
|
branches: ["main"]
|
2023-06-21 23:29:41 +02:00
|
|
|
pull_request:
|
2023-10-19 20:19:59 +02:00
|
|
|
branches: ["main"]
|
2023-06-21 23:29:41 +02:00
|
|
|
|
2023-10-19 20:19:59 +02:00
|
|
|
jobs:
|
2023-06-21 23:29:41 +02:00
|
|
|
test:
|
|
|
|
name: Run tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-10-19 20:19:59 +02:00
|
|
|
uses: actions/checkout@v4
|
2023-12-23 21:58:57 +01:00
|
|
|
|
2023-10-19 20:19:59 +02:00
|
|
|
- name: Run unit tests
|
2024-01-15 15:14:54 +01:00
|
|
|
run: make test
|
2023-12-23 21:58:57 +01:00
|
|
|
|
2023-06-21 23:29:41 +02:00
|
|
|
- name: Run formatter
|
2024-01-15 15:14:54 +01:00
|
|
|
run: cd src && test -z $(gofmt -l .)
|
2023-12-23 21:58:57 +01:00
|
|
|
|
|
|
|
- name: golangci-lint
|
|
|
|
uses: golangci/golangci-lint-action@v3
|
|
|
|
with:
|
|
|
|
version: v1.55.2
|
2024-01-15 15:14:54 +01:00
|
|
|
working-directory: src
|