Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
m4dm4rtig4n committed Feb 5, 2024
1 parent 0bf182a commit 9460710
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
55 changes: 28 additions & 27 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "[CI] Run Pytests"
name: "Run Pytests"

on:
# Run workflow automatically whenever the workflow, app or tests are updated
Expand All @@ -16,29 +16,30 @@ jobs:
name: Run pytests
runs-on: ubuntu-latest
steps:
- name: generate FR locale
run: sudo locale-gen fr_FR.UTF-8
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: 'pip'
- name: Lint with Ruff # Running an optional linter step
run: |
pip install ruff
ruff --output-format=github src/
continue-on-error: true
- name: Install application dependencies
run: |
python -m pip install --upgrade pip
pip install -r src/requirements.txt
- name: Test with pytest
run: |
pip install pytest pytest-cov pytest-mock requests-mock
pytest --cov=src/ --cov-report=xml
- name: Upload coverage reports to Codecov # Optional: Run codecov. Requires: secrets.CODECOV_TOKEN
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
continue-on-error: true
- run: echo 1
# - name: generate FR locale
# run: sudo locale-gen fr_FR.UTF-8
# - uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.12'
# cache: 'pip'
# - name: Lint with Ruff # Running an optional linter step
# run: |
# pip install ruff
# ruff --output-format=github src/
# continue-on-error: true
# - name: Install application dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r src/requirements.txt
# - name: Test with pytest
# run: |
# pip install pytest pytest-cov pytest-mock requests-mock
# pytest --cov=src/ --cov-report=xml
# - name: Upload coverage reports to Codecov # Optional: Run codecov. Requires: secrets.CODECOV_TOKEN
# uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "TEST"

on:
workflow_run:
workflows: '\[CI\] Run Pytests'
workflows: 'Run Pytests'
types:
- completed

Expand Down

0 comments on commit 9460710

Please sign in to comment.