feat: clean up & refactor majorly #3
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: Code Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
unit-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.11', '3.12', '3.13'] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
# Set up python versions with matrix to test on multiple versions | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
id: ct-${{ matrix.python-version}} | ||
Check failure on line 28 in .github/workflows/code_test.yaml GitHub Actions / Code TestInvalid workflow file
|
||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'poetry' | ||
# Install all test dependencies | ||
- name: Install dependencies | ||
if: steps.ct-${{ matrix.python-version }}.outputs.cache-hit != 'true' | ||
run: poetry install --only=test --no-interaction --no-root | ||
- 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: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
flags: smart-tests | ||
verbose: true | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |