From c166dbabdb2498eb922100217f0bf9ca6b9a01a1 Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Sun, 11 Aug 2024 19:19:43 +0200 Subject: [PATCH] feat(ci-cd): Add pull request go tests --- .github/workflows/pr-tests.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pr-tests.yaml diff --git a/.github/workflows/pr-tests.yaml b/.github/workflows/pr-tests.yaml new file mode 100644 index 0000000..26142a5 --- /dev/null +++ b/.github/workflows/pr-tests.yaml @@ -0,0 +1,26 @@ +name: Run Go tests + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ '1.22.x' ] + + steps: + - uses: actions/checkout@v4 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + # You can test your matrix by printing the current Go version + - name: Display Go version + run: go version + + - name: Get dependencies + run: go mod download + + - name: Run tests + run: go test -v ./...