Skip to content

Go CI

Go CI #1115

Workflow file for this run

name: Go CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.17'
- name: Build Server
run: |
cd cmd/server
go build -o hmac-file-server main.go
- name: Start Server
run: |
cd cmd/server
./hmac-file-server &
echo $! > server.pid
shell: bash
- name: Wait for Server to Start
run: sleep 5
- name: Run Tests
env:
SERVER_URL: http://127.0.0.1:8080
run: |
cd test
go test -v ./...
- name: Stop Server
run: |
kill $(cat cmd/server/server.pid)
shell: bash