Booking enhancements #1572
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: Lint and format | |
# https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-nodejs-or-python?langId=py#requirements-file | |
on: | |
pull_request: | |
types: [opened, edited, ready_for_review, synchronize] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
# Setup Python (faster than using Python container) | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
pip install "fastapi[all]" | |
- name: Lint with flake8 | |
run: python -m flake8 | |
- name: Format with black | |
run: black . --check --diff | |
- name: Sort imports with isort | |
run: "isort . --check-only --diff" | |
- name: Cache .mypy_cache folder | |
id: mypy_cache | |
uses: actions/cache@v3 | |
with: | |
path: .mypy_cache | |
key: mypy_cache-${{ github.head_ref }} | |
- name: Type checking using mypy | |
run: mypy . |