This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
build(deps-dev): bump ruff from 0.5.1 to 0.5.3 #505
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@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: "1.8.2" | |
- name: Resolve dependencies | |
run: poetry export -f requirements.txt --without-hashes --with test --output requirements.txt | |
- name: Run the tests | |
env: | |
SUPERADMIN_GH_PAT: ${{ secrets.SUPERADMIN_GH_PAT }} | |
GH_OAUTH_ID: ${{ secrets.GH_OAUTH_ID }} | |
GH_OAUTH_SECRET: ${{ secrets.GH_OAUTH_SECRET }} | |
OLLAMA_MODEL: tinydolphin:1.1b-v2.8-q3_K_M | |
run: | | |
docker compose -f docker-compose.dev.yml up -d --build --wait | |
docker compose -f docker-compose.dev.yml exec -T backend pytest --cov=app --cov-report xml tests/ | |
docker compose -f docker-compose.dev.yml cp backend:/app/coverage.xml ./coverage-src.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage-src.xml | |
flags: unittests | |
fail_ci_if_error: true | |
migrations: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: "1.8.2" | |
- name: Resolve dependencies | |
run: poetry export -f requirements.txt --without-hashes --output requirements.txt | |
- name: Build & run docker + run migrations | |
env: | |
SUPERADMIN_GH_PAT: ${{ secrets.SUPERADMIN_GH_PAT }} | |
GH_OAUTH_ID: ${{ secrets.GH_OAUTH_ID }} | |
GH_OAUTH_SECRET: ${{ secrets.GH_OAUTH_SECRET }} | |
OLLAMA_MODEL: tinydolphin:1.1b-v2.8-q3_K_M | |
run: | | |
docker compose -f docker-compose.dev.yml up -d --build | |
sleep 20 | |
docker compose -f docker-compose.dev.yml logs backend | |
docker compose -f docker-compose.dev.yml up -d --wait | |
# debug | |
docker compose -f docker-compose.dev.yml exec -T backend alembic current | |
docker compose -f docker-compose.dev.yml exec -T backend alembic history --verbose | |
docker compose -f docker-compose.dev.yml exec -T backend alembic stamp head | |
docker compose -f docker-compose.dev.yml exec -T backend alembic downgrade -1 | |
docker compose -f docker-compose.dev.yml exec -T backend alembic upgrade +1 | |
headers: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Check the headers | |
uses: frgfm/validate-python-headers@main | |
with: | |
license: 'Apache-2.0' | |
owner: 'Quack AI' | |
starting-year: 2023 | |
ignore-files: 'version.py,__init__.py' | |
ignore-folders: 'src/tests,src/migrations/versions' |