Fix charts again #167
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: Python Lint and Test - Backend | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: read | |
env: | |
FIREBASE_KEY: ${{ secrets.FIREBASE_KEY }} | |
CONTACT_MONGODB_AT: ${{ secrets.CONTACT_MONGODB_AT }} | |
BACKEND_PORT: ${{ secrets.BACKEND_PORT }} | |
MONGODB_PORT: ${{ secrets.MONGODB_PORT }} | |
jobs: | |
Lint_And_Test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
working-directory: ./apps/backend | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install coverage | |
pip install pipenv | |
pipenv install --dev --system --deploy --ignore-pipfile | |
- name: Analyze backend with pylint | |
working-directory: ./apps/backend | |
# https://pylint.readthedocs.io/en/v2.16.1/user_guide/configuration/all-options.html#fail-on | |
# Uses the .pylintrc rules file in the working directory | |
# Fail if any Error-level notices were produced | |
# Fail if the code quality score is below 9.0 | |
# Recursively search the specified directories for files to analyze | |
# Check the file app.py | |
run: pylint --fail-on=E --fail-under=9.0 --recursive=y app.py | |
- name: Test backend with pytest + record coverage | |
working-directory: ./apps/backend | |
run: bash coverage.sh | |
- name: Zip backend coverage report | |
working-directory: ./apps/backend | |
run: zip -r codeCoverage.zip coverageReport/ | |
- name: Upload backend coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage-report-backend | |
path: ./apps/backend/codeCoverage.zip |