-
Notifications
You must be signed in to change notification settings - Fork 37
93 lines (77 loc) · 2.48 KB
/
tests.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
name: tests
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
options:
- -Dsystemd=enabled
- -Dsystemd=disabled
flags:
- null
- CFLAGS="-fsanitize=address -fsanitize=leak -g" LDFLAGS="-fsanitize=address -fsanitize=leak"
steps:
- name: Inspect environment
run: |
whoami
gcc --version
- uses: actions/checkout@v3
- name: Install required packages
run: |
sudo apt-get update
sudo apt-get install meson libcurl4-openssl-dev libsystemd-dev libjson-glib-dev
- name: Build (with ${{ matrix.options }} ${{ matrix.flags }})
run: |
${{ matrix.flags }} meson build ${{ matrix.options }} -Dwerror=true
ninja -C build
- name: Build release
run: |
ninja -C build dist
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install test dependencies
run: |
sudo apt-get install libgirepository1.0-dev nginx-full
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: Login to DockerHub
uses: docker/login-action@v2
if: github.ref == 'refs/heads/master'
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Update/launch hawkBit docker container
run: |
docker pull hawkbit/hawkbit-update-server
docker run -d --name hawkbit -p 8080:8080 hawkbit/hawkbit-update-server \
--hawkbit.server.security.dos.filter.enabled=false \
--hawkbit.server.security.dos.maxStatusEntriesPerAction=-1
- name: Run test suite
run: |
./test/wait-for-hawkbit-online
ASAN_OPTIONS=fast_unwind_on_malloc=0 dbus-run-session -- pytest -v
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install required packages
run: |
sudo apt-get update
sudo apt-get install meson libcurl4-openssl-dev libjson-glib-dev python3-sphinx python3-sphinx-rtd-theme doxygen
- name: Meson Build documentation (Sphinx & Doxygen)
run: |
meson build
ninja -C build docs/html
ninja -C build doxygen
uncrustify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run uncrustify check
run: |
./uncrustify.sh
git diff --exit-code