Skip to content

Update python-app.yml #256

Update python-app.yml

Update python-app.yml #256

Workflow file for this run

name: Python application
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9.2
uses: actions/setup-python@v2
with:
python-version: 3.9.2
- name: Cache pre-commit
uses: actions/[email protected]
id: cache-precommit
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Cache Python files
uses: actions/cache@v2
with:
path: |
~/.virtualenvs
~/.cache/pip
~/.cache/pypoetry
key: poetry-${{ hashFiles('**/poetry.lock', '**/pyproject.toml') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock', '**/pyproject.toml') }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Project Dependencies
run: |
cd backend
poetry install --no-interaction --no-root
if: steps.cache-poetry-envs.outputs.cache-hit != 'true'
- name: Run commit hooks
run: |
cd backend
touch .dev-reqs && touch .prod-reqs
make hooks