29 lines
730 B
YAML
29 lines
730 B
YAML
name: Check linting and formatting of Python project
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
path_to_project:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
lint:
|
|
name: Check linting and formatting of Python project
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8.12
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt --upgrade
|
|
working-directory: ${{ inputs.path_to_project }}
|
|
|
|
- name: Check code and formatting
|
|
run: scripts/check-python.sh ${{ inputs.path_to_project }}
|