-
Notifications
You must be signed in to change notification settings - Fork 5
118 lines (113 loc) · 3.58 KB
/
python.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
on:
push:
branches:
- "master"
- "release/*"
pull_request:
branches:
- "master"
- "release/*"
name: Python CI
jobs:
py_build:
name: Build Python Bindings for Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Install requirements
run: |
sudo apt-get update
sudo apt-get install libgtk-3-dev
sudo apt-get install libgirepository1.0-dev
sudo apt-get install xvfb
sudo apt-get install libdbus-1-dev libaudit-dev libauparse-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: 1.66.1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv==2023.7.4 || pip install pipenv
pipenv install --dev --keep-outdated --python ${{ matrix.python-version }}
- name: Build
id: build
run: |
pipenv run compile_catalog
pipenv run python setup.py bdist_wheel
echo ::set-output name=virt_env::$(pipenv --venv)
ui_format_check:
name: UI formatter check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Format check with black
uses: psf/black@stable
with:
options: "--check --diff -t py39"
src: "./fapolicy_analyzer"
version: "~= 22.0"
ui_lint:
name: UI Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
id: install_deps
run: |
python -m pip install --upgrade pip
pip install flake8 flake8-i18n
- name: Lint with flake8
run: python -m flake8 ./fapolicy_analyzer
ui_test:
name: UI Test Suite for Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Install requirements
run: |
sudo apt-get update
sudo apt-get install libgtk-3-dev
sudo apt-get install libgirepository1.0-dev
sudo apt-get install xvfb
sudo apt-get install libgtksourceview-3.0-dev
sudo apt-get install gir1.2-webkit2-4.0
sudo apt-get install libdbus-1-dev libaudit-dev libauparse-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install extra locales
id: install_locales
run: |
sudo apt-get -y install locales
sudo locale-gen es_ES.UTF-8
- name: Install dependencies
id: install_deps
run: |
python -m pip install --upgrade pip
pip install pipenv==2023.7.4 || pip install pipenv
pipenv install --dev --python ${{ matrix.python-version }}
echo ::set-output name=virt_env::$(pipenv --venv)
- name: Setup Bindings
run: pipenv run python setup.py develop
- name: Test with pytest
run: pipenv run test