forked from Ekristoffe/ModbusSniffer
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.15 KB
/
Copy pathci.yml
File metadata and controls
55 lines (47 loc) · 1.15 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
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libegl-mesa0 \
libegl1 \
libgl1 \
libgl1-mesa-dri \
xvfb \
libxrender1 \
libxext6 \
libxrandr2 \
libxi6 \
libfontconfig1 \
libxcb-glx0 \
libxcb-render0 \
libxcb-shape0 \
libxcb-xfixes0
- uses: actions/setup-python@v4
with:
python-version: '3.12.3'
- name: Install Python dependencies
run: |
python -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -e ".[dev]"
- name: Lint with flake8
run: |
.venv/bin/flake8 src/modbus_sniffer
- name: Run tests with Xvfb
uses: GabrielBB/xvfb-action@v1
with:
run: .venv/bin/pytest --cov=src/modbus_sniffer tests/
env:
QT_QPA_PLATFORM: offscreen