Repository navigation
65 lines (57 loc) · 2.53 KB
/
Copy pathpython-cleanliness.yml
File metadata and controls
65 lines (57 loc) · 2.53 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
name: test Python cleanliness
on: [push, pull_request, workflow_dispatch]
concurrency:
group: ci-${{github.workflow}}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
# git checkout the PR
- uses: actions/checkout@v6
with:
submodules: 'recursive'
- name: Install dependencies
run: |
python -m pip install -U flake8
- name: Check Python with Flake8
run: |
scripts/run_flake8.py MAVProxy
tests:
# noble's ffmpeg 6.1 accepts the escaped SEI bitstream filter the video tests need
runs-on: ubuntu-24.04
# these tests are about processes which fail to exit, so do not let
# one hang the job until the platform's own six hour limit
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-venv python3-wxgtk4.0 xvfb ffmpeg
python3 -m venv --system-site-packages test-venv
test-venv/bin/pip install pytest 'numpy<2' 'opencv-python-headless<4.12' matplotlib defusedxml pyserial pynmeagps pexpect PyYAML requests
# Exercise the released dialect, which lacks some newer extensions.
test-venv/bin/pip install 'pymavlink==2.4.49'
- name: Run regression tests with released pymavlink
run: xvfb-run -a test-venv/bin/python -m pytest -q -rfsE tests/
tests-pymavlink-master:
# the job above pins the released pymavlink; this one is what
# developers run, and is the first to see a dialect change
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-venv python3-wxgtk4.0 xvfb ffmpeg
python3 -m venv --system-site-packages test-venv
test-venv/bin/pip install pytest 'numpy<2' 'opencv-python-headless<4.12' matplotlib defusedxml pyserial pynmeagps pexpect PyYAML requests
- name: Install pymavlink from the mavlink repository
run: |
git clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/ArduPilot/mavlink.git "$RUNNER_TEMP/mavlink"
cd "$RUNNER_TEMP/mavlink/pymavlink"
MDEF="$RUNNER_TEMP/mavlink/message_definitions" "$GITHUB_WORKSPACE/test-venv/bin/pip" install .
- name: Run regression tests with pymavlink master
run: xvfb-run -a test-venv/bin/python -m pytest -q -rfsE tests/