-
-
Notifications
You must be signed in to change notification settings - Fork 181
59 lines (51 loc) · 1.49 KB
/
code-checker.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: code-checker
on:
push:
# only build each push to develop and master, other branches are built through pull requests
branches: [develop, master]
pull_request:
workflow_dispatch:
inputs:
run-lint:
description: 'Run lint job'
required: false
default: true
type: boolean
run-static-check:
description: 'Run static-check job'
required: false
default: true
type: boolean
jobs:
lint:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.run-lint == 'true' || github.event_name == 'push' }}
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '>=3.6'
- name: Run black
uses: psf/black@stable
static-check:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.run-static-check == 'true' || github.event_name == 'push' }}
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Pyflakes
run: |
pip3 install --upgrade pip
pip3 install pyflakes
- name: Detect errors with pyflakes
run: pyflakes .