Add CI
This commit is contained in:
parent
8cacde72a5
commit
f756df2e50
3 changed files with 159 additions and 0 deletions
29
.github/workflows/generic-lint-python.yml
vendored
Normal file
29
.github/workflows/generic-lint-python.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue