2023-06-21 23:29:41 +02:00
|
|
|
name: Test
|
|
|
|
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
|
|
|
|
- name: Run unit tests
|
|
|
|
run: go test -v ./src/tests
|
2023-06-21 23:29:41 +02:00
|
|
|
- name: Run formatter
|
|
|
|
run: test -z $(gofmt -l ./src)
|