forked from pycubed/software_example_beepsat
-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (37 loc) · 1.2 KB
/
lint.yml
File metadata and controls
45 lines (37 loc) · 1.2 KB
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
41
42
43
44
45
name: Lint
on:
# Trigger the workflow on all pull requests, and pushes to main
push:
branches:
- 'main'
pull_request:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Get file changes
id: get_file_changes
uses: trilom/file-changes-action@v1.2.4
with:
output: ' '
- name: Echo file changes
run: |
echo Changed files: ${{ steps.get_file_changes.outputs.files_modified }} ${{steps.get_file_changes.outputs.files_added}}
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: pip install flake8
- name: Run linters
uses: wearerequired/lint-action@v2
with:
flake8: true
flake8_args: ${{ steps.get_file_changes.outputs.files_modified }} ${{steps.get_file_changes.outputs.files_added}}