-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 998 Bytes
/
ci-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI Pipeline
on: [push]
jobs:
ci-pipeline:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get changed files
uses: dorny/paths-filter@v2
id: filter
with:
list-files: shell
filters: |
py_modified:
- added|modified: "./**/*.py"
- name: Setup Python
if: ${{ steps.filter.outputs.py_modified == 'true' }}
uses: actions/setup-python@v2
with:
python-version: 3.10.4
architecture: x64
cache: 'pip'
- name: Install dependencies
if: ${{ steps.filter.outputs.py_modified == 'true' }}
run: |
pip install -r requirements-dev.txt
pip install -r requirements.txt
- name: Run black
if: ${{ steps.filter.outputs.py_modified == 'true' }}
uses: psf/black@stable
with:
options: "--check"
src: "."
version: "22.3.0"