From ba264d134c32090c69ea3fcc3766d6cd49ccaf3c Mon Sep 17 00:00:00 2001 From: Vinayak Gaikwad Date: Sat, 31 May 2025 10:38:33 +0530 Subject: [PATCH] Add pull request checks workflow - currently tests are failing on main branch, this will make sure tests are run on every pr and get feedback before merging into main --- .github/workflows/pull-request.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..46976d7 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,34 @@ +name: Pull Request Checks + +on: + pull_request: + branches: [ main ] + paths: + - '**/*.go' + - '.github/workflows/pull-request.yml' + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.19' + check-latest: true + + - name: Check out code + uses: actions/checkout@v4 + + - name: Get dependencies + run: go mod download + + - name: Run tests + run: go test -v ./... + + - name: Run linter + uses: golangci/golangci-lint-action@v3 + with: + version: latest + args: --timeout=5m