-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 975 Bytes
/
ci.yml
File metadata and controls
40 lines (38 loc) · 975 Bytes
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
38
39
40
name: CI
on:
push:
branches: [ main ]
paths:
- '**.py'
pull_request:
branches: [ main ]
paths:
- '**.py'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get file changes
id: get_file_changes
uses: trilom/file-changes-action@v1.2.4
with:
output: ' '
- name: Report list of changed files
run: |
echo Changed files: ${{ steps.get_file_changes.outputs.files }}
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest
- name: Run Pylint on changed files
run: |
echo "${{ steps.get_file_changes.outputs.files}}" | tr " " "\n" | grep ".py$" | xargs pylint --rcfile=pylintrc
- name: Run Pytest
run: |
pytest src/tests