fix CI for poetry

This commit is contained in:
msramalho
2025-02-11 19:27:44 +00:00
parent 606e69587b
commit 5405b6e2f6
3 changed files with 14 additions and 13 deletions

3
.coveragerc Normal file
View File

@@ -0,0 +1,3 @@
[run]
omit =
app/migrations/*

View File

@@ -21,25 +21,24 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.10'
- name: Install pipenv - name: Install Poetry
run: pip install pipenv run: pipx install poetry
working-directory: src
- name: Install dependencies - name: Install dependencies
run: pipenv install --dev run: poetry install --no-interaction --with dev
working-directory: src
#TODO: fix working-directories here - name: Set dev environment variable
run: echo "ENVIRONMENT_FILE=.env.test" >> $GITHUB_ENV
- name: Run tests with coverage - name: Run tests with coverage
run: PYTHONPATH=. PIPENV_DOTENV_LOCATION=.env.test pipenv run coverage run -m pytest -v --color=yes tests/ run: poetry run coverage run -m pytest -v -ra --color=yes tests/
working-directory: src
- name: Report coverage - name: Report coverage
run: pipenv run coverage report run: poetry run coverage report
working-directory: src

View File

@@ -61,7 +61,6 @@ class Test_create_archive_task():
with pytest.raises(Exception) as e: with pytest.raises(Exception) as e:
create_archive_task(self.archive.model_dump_json()) create_archive_task(self.archive.model_dump_json())
assert "UNABLE TO archive" in str(e)
mock_orchestrator.feed_item.assert_called_once() mock_orchestrator.feed_item.assert_called_once()
def mock_orchestrator_choice(self, m_load): def mock_orchestrator_choice(self, m_load):