Skip to content

feat: add .github/workflows/ #1

feat: add .github/workflows/

feat: add .github/workflows/ #1

Workflow file for this run

name: Go Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 'latest'
- name: Run tests
run: go test ./...
- name: Check if tests passed
run: |
test_exit_code=$?
if [ $test_exit_code -eq 0 ]; then
echo "Tests passed!"
else
echo "Tests failed!"
exit $test_exit_code
fi