Skip to content

Feat/architecture

Feat/architecture #17

Workflow file for this run

name: Run - Integration Tests
on:
pull_request:
branches:
- main
jobs:
integration_tests:
name: Run Integration Tests
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.21.5
- name: Run Tests
run: |
cd src
go test -count=2 -v ./...
- name: Generate Coverage Profile
run: go test -coverprofile=coverage.out ./...
- name: Display Coverage Percentage
run: |
coverage_percentage=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | tr -d '%')
echo "Coverage percentage: $coverage_percentage"
python -c "import sys; sys.exit(0 if float('$coverage_percentage') >= 80 else 1)" || (echo "Coverage is less than 80%. Please increase the coverage."; exit 1)