Skip to content

72 expressions improvements (#117) #160

72 expressions improvements (#117)

72 expressions improvements (#117) #160

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install -r requirements/core.txt
pip install -r requirements/testing.txt
- name: Test with pytest
env:
MONGODB_PASSWORD: ${{secrets.MONGODB_PASSWORD}}
run: |
pytest
lint-and-format-backend:
continue-on-error: true
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
checks: write
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Check Black formatting
uses: reviewdog/action-black@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
filter_mode: added
level: warning
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
if: always()
- name: Check Ruff linting (Reviewdog)
if: always()
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip3 install ruff
ruff check . \
| reviewdog -name=Ruff -reporter=local -reporter=github-pr-review -efm="%f:%l:%c: %m" -filter-mode=added -fail-on-error=false
- name: Check Mypy linting
if: always()
uses: tsuyoshicho/action-mypy@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
filter_mode: added
setup_command: pip3 install --no-cache-dir --upgrade -r requirements/all.txt
setup_method: install
level: warning
mypy_flags: --python-version 3.10