Add go test workflow

This commit is contained in:
2024-11-21 19:42:50 +01:00
parent 6cb5aec372
commit 435dce89d9

39
.github/workflows/go-test.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Go Tests
on:
push:
branches:
- "*"
pull_request:
branches:
- main
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
# - name: Install dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y gcc
- name: Run Tests
run: go test ./... -v
- name: Run Tests with Race Detector
run: go test -race ./... -v