From 435dce89d99dd0b3119b643a4b765840283387c5 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Thu, 21 Nov 2024 19:42:50 +0100 Subject: [PATCH] Add go test workflow --- .github/workflows/go-test.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/go-test.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..108f629 --- /dev/null +++ b/.github/workflows/go-test.yml @@ -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