Multithread experiments #170
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 - Runner | |
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/runner | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install coverage | |
pip install pipenv | |
pipenv install --dev --system --deploy --ignore-pipfile | |
- name: Analyze runner with pylint | |
working-directory: ./apps/runner | |
# 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 runner.py | |
# Check the ./modules and ./tests directory | |
run: pylint --fail-on=E --fail-under=9.0 --recursive=y runner.py ./modules/ ./tests/ | |
- name: Test runner with pytest + record coverage | |
working-directory: ./apps/runner | |
run: bash coverage.sh | |
- name: Zip runner coverage report | |
working-directory: ./apps/runner | |
run: zip -r codeCoverage.zip coverageReport/ | |
- name: Upload runner coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage-report-runner | |
path: ./apps/runner/codeCoverage.zip |