Skip to content

Commit

Permalink
fix: test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeAeich committed May 18, 2024
1 parent b6d3e27 commit 9345667
Show file tree
Hide file tree
Showing 5 changed files with 622 additions and 13 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/code_test_unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,16 @@ jobs:
cache: 'poetry'

- name: Install test dependencies
run: poetry install --only=test --no-interaction --no-root
run: poetry install --only=test --no-interaction

- name: Run ATS
uses: codecov/codecov-ats@v0
env:
CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Run tests
run: poetry run pytest --cov app ${{ env.CODECOV_ATS_TESTS }}
- name: Run tests and generate coverage as test_unit.xml
run: poetry run pytest --cov-report term --cov-report xml:test_unit.xml --cov=tests/test_unit

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
flags: smart-tests
token: ${{ secrets.CODECOV_TOKEN }}
flags: test_unit
files: ./test_unit.xml
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ fs = "*"
moto = "*"
pytest-localftpserver = "*"
kubernetes = "*"
pytest-cov = "^5.0.0"

[tool.ruff.lint]
select = [
Expand Down
Binary file added test_unit
Binary file not shown.
Loading

0 comments on commit 9345667

Please sign in to comment.