-
-
Notifications
You must be signed in to change notification settings - Fork 23
80 lines (79 loc) · 2.49 KB
/
ubuntu_test.yml
File metadata and controls
80 lines (79 loc) · 2.49 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
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
---
name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * 5'
jobs:
unlimited:
name: Run build and unit tests. (unlimited API)
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install dependencies
run: |
sudo apt update
sudo apt install python3-setuptools python3-dev libsystemd-dev \
systemd dbus python3 gcc
- name: Build extension
run: |
python3 setup.py build --build-lib build-lib
- name: Run unit tests
run: |
PYTHONPATH=./build-lib python3 -m unittest --verbose
limited:
name: Run build and unit tests. (limited API)
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install dependencies
run: |
sudo apt update
sudo apt install python3-setuptools python3-dev libsystemd-dev \
systemd dbus python3 gcc pkg-config
- name: Build extension
env:
PYTHON_SDBUS_USE_LIMITED_API: "1"
run: |
python3 setup.py build --build-lib build-lib
- name: Run unit tests
run: |
PYTHONPATH=./build-lib python3 -m unittest --verbose
lint:
name: Run linters on the code
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install dependencies
run: |
sudo apt update
sudo apt install python3 python3-pip ninja-build
python -m venv --system-site-packages venv
./venv/bin/pip install --upgrade \
mypy isort flake8 pyflakes pycodestyle \
jinja2 'Sphinx<8.0' types-setuptools meson
- name: Run linters
run: |
export PATH="$(readlink -f ./venv/bin):${PATH}"
meson setup build
meson compile -C build lint-python
alpine:
name: Alpine Linux test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Build Alpine container
run: |
podman build --tag alpine-ci -f ./test/containers/Containerfile-alpine .
- name: Test unlimited API
run: |
podman run --rm alpine-ci
- name: Test limited API
run: |
podman run --env PYTHON_SDBUS_USE_LIMITED_API=1 --rm alpine-ci