-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (57 loc) · 1.45 KB
/
ci.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: plugins ci
on:
push:
paths-ignore:
- 'COPYING'
- 'README.md'
- '**.info'
- '**.txt'
- '*/CONTROL/*'
pull_request:
paths-ignore:
- 'COPYING'
- 'README.md'
- '**.info'
- '**.txt'
- '*/CONTROL/*'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install python packages
run: |
pip install flake8
- name: Install dev packages
run: |
sudo apt install gettext python3.11-dev
- name: Build plugins
env:
CC: "gcc-10"
CXX: "g++-10"
run: |
autoreconf -i
./configure CFLAGS=-I/usr/include/tirpc
make
python -O -m compileall .
- name: Check code changes
uses: dorny/paths-filter@v2
id: filter
with:
base: python3
list-files: shell
filters: |
mod:
- added|modified: '**.py'
- name: Lint changed code
continue-on-error: true
if: ${{ steps.filter.outputs.mod == 'true' }}
run: |
mod_files="${{ steps.filter.outputs.mod_files }}"
flake8 --ignore=E126,E127,E128,E501,W191 --builtins="_,ngettext,pgettext" --show-source --filename=./${mod_files// /,.\/}