From 92b7f0330030b3ed59fe520fb89879e7e58b1ec7 Mon Sep 17 00:00:00 2001 From: Prathamesh Gadekar <93116210+Pr0-C0der@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:55:59 +0530 Subject: [PATCH] Create pr-check.yml (#42) Created Github actions workflow for Fixes #41. --- .github/workflows/pr-check.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 0000000..3b8b3cb --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,29 @@ +# This workflow will build and test the library +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Test PR + +on: + pull_request: + branches: + - main + +jobs: + check-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Building + run: go build ./... + - name: Test + run: go test ./... + + - name: Prevent Merging on Failure + if: failure() + run: exit 1