Skip to content

badaas as library

badaas as library #468

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
branch-naming-rules:
name: Check branch name
runs-on: ubuntu-latest
steps:
- uses: deepakputhraya/action-branch-name@master
with:
regex: '^(feature|bugfix|improvement|library|prerelease|release|hotfix|poc)\/[a-z0-9_.-]+$'
allowed_prefixes: 'feature,bugfix,improvement,library,prerelease,release,hotfix,poc'
ignore: main,dev
min_length: 5
max_length: 50
unit-tests:
name: Unit tests
needs: [branch-naming-rules]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '^1.18'
cache: true
- name: Run unit tests
run: go test ./... -coverprofile=coverage_unit.out -v
- uses: actions/upload-artifact@v3
with:
name: coverage_unit
path: coverage_unit.out
e2e-tests:
name: E2E Tests
needs: [unit-tests, check-style]

Check failure on line 43 in .github/workflows/CI.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/CI.yml (Line: 43, Col: 25): Job 'e2e-tests' depends on unknown job 'check-style'.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '^1.18'
cache: true
- name: Start containers
run: docker compose -f "docker/test_db/docker-compose.yml" -f "docker/test_api/docker-compose.yml" up -d --build
- name: Wait for API server to be up
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:8000/info"
timeout: 60
- name: Run test
run: go test ./test_e2e -v
- name: Get logs
if: always()
run: docker compose -f "docker/test_db/docker-compose.yml" -f "docker/test_api/docker-compose.yml" logs --no-color 2>&1 | tee app.log &
- name: Stop containers
if: always()
run: docker compose -f "docker/test_db/docker-compose.yml" -f "docker/test_api/docker-compose.yml" down
- uses: actions/upload-artifact@v3
with:
name: docker-compose-e2e-logs
path: app.log