setup integration tests environment #129
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Build and Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22.0' | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Build listener | |
run: | | |
cd ./listener | |
go build -a -installsuffix cgo -o bin/listener ./cmd/listener | |
- name: Build jwt-generator | |
run: | | |
cd ./listener | |
go build -a -installsuffix cgo -o bin/jwt-generator ./cmd/jwt-generator | |
- name: Setup Integration Test Environment | |
run: | | |
docker compose -f docker-compose-ci.yml up --build -d | |
- name: Test | |
run: | | |
cd ./listener | |
go test -v ./... |