Bump django version and add linting to CI #1
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: API Lint | |
on: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: '3.9' | |
- name: Pip cache | |
id: pip-cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: api-lint-${{ runner.os }}-${{ env.pythonLocation }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements-dev.txt') }} | |
- name: Install deps | |
if: steps.pip-cache.outputs.cache-hit != 'true' | |
run: | | |
cd api | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
python -m pip install -r requirements-dev.txt | |
- name: Run linting | |
run: | | |
sh ./scripts/lint.sh |