Skip to content

Commit

Permalink
add codecov + backend lint
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl committed Jun 27, 2023
1 parent 1a5215f commit 154364a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint

on: [push, pull_request]

jobs:
backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Backend code formatting check (Black)
uses: psf/black@stable
11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,23 @@ jobs:
python -m pip install -r requirements.txt
python -m pip install pytest
python -m pip install pytest-flask
python -m pip install pytest-cov
working-directory: ./backend
- name: Install backend
run: |
cp -n config/conftest.py config/config.py
cp -n config/conftest.py config/config.py
working-directory: ./backend
- name: Run pytests
run: |
pytest test/
pytest -v --cov --cov-report xml
working-directory: ./backend
env:
env:
MAIL_SERVER: ${{secrets.MAIL_SERVER}}
MAIL_PORT: ${{secrets.MAIL_PORT}}
MAIL_USERNAME: ${{secrets.MAIL_USERNAME}}
MAIL_PASSWORD: ${{secrets.MAIL_PASSWORD}}
MAIL_DEFAULT_SENDER: ${{secrets.MAIL_USERNAME}}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: pytest

0 comments on commit 154364a

Please sign in to comment.