Skip to content

chore: added test and pr merge check workflow #3

chore: added test and pr merge check workflow

chore: added test and pr merge check workflow #3

Workflow file for this run

name: Test and PR Merge Check
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Run tests
run: go test ./...
- name: Check if PR can be merged
if: github.event_name == 'pull_request'
run: |
if [ $? -ne 0 ]; then
echo "Tests failed, PR cannot be merged!"
exit 1
fi