This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
refactor: Refactors analytics into telemetry module #41
Workflow file for this run
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: tests | |
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: "1.6.1" | |
- name: Resolve dependencies | |
run: poetry export -f requirements.txt --without-hashes --with dev --output requirements.txt | |
- name: Build & run docker | |
env: | |
SUPERUSER_LOGIN: ${{ secrets.SUPERUSER_LOGIN }} | |
SUPERUSER_ID: ${{ secrets.SUPERUSER_ID }} | |
SUPERUSER_PWD: ${{ secrets.SUPERUSER_PWD }} | |
GH_OAUTH_ID: ${{ secrets.GH_OAUTH_ID }} | |
GH_OAUTH_SECRET: ${{ secrets.GH_OAUTH_SECRET }} | |
run: docker compose -f docker-compose.test.yml up -d --build | |
- name: Run docker test | |
run: | | |
docker compose -f docker-compose.test.yml exec -T backend pytest --cov=app --cov-report xml tests/ | |
docker compose -f docker-compose.test.yml cp backend:/app/coverage.xml ./coverage-src.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage-src.xml | |
flags: unittests | |
fail_ci_if_error: true | |
headers: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Check the headers | |
uses: frgfm/validate-python-headers@main | |
with: | |
license-notice: '.github/license-notice.txt' | |
owner: 'Quack AI' | |
starting-year: 2023 | |
ignore-files: 'version.py,__init__.py' | |
ignore-folders: 'src/tests' |