-
-
Notifications
You must be signed in to change notification settings - Fork 8
69 lines (60 loc) · 2.17 KB
/
Copy pathtest-python-package.yml
File metadata and controls
69 lines (60 loc) · 2.17 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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Run Python Tests
on:
# Allow manual runs of workflow from Actions tab
workflow_dispatch:
push:
paths-ignore: # ignore files that don't change build output
- '**.md'
- .github/dependabot.yml
- .gitignore
- LICENSE
pull_request:
paths-ignore: # ignore files that don't change build output
- '**.md'
- .github/dependabot.yml
- .gitignore
- LICENSE
jobs:
python:
name: Python Tests
runs-on: "ubuntu-26.04"
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install depends
run: |
sudo apt update
sudo apt install build-essential git unzip zip nload tree ufw nftables vlan sqlite3 lldpd xxd dbus pkg-config gcc libpq-dev libdbus-glib-1-dev libglib2.0-dev cmake libdbus-1-dev python3-pip python3-dev python3-venv python3-wheel python3-setuptools
sudo apt remove -y meson
python -m ensurepip --upgrade
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade "tox<4.26" "genbadge[coverage]"
if [ -f requirements.txt ]; then
grep -v "dbus-python" requirements.txt > requirements_ci.txt
pip install -r requirements_ci.txt
fi
- name: Run tests with tox
id: tox-run
run: |
source venv/bin/activate
tox
slack-workflow-status:
if: ${{ always() && (github.repository_owner == 'WLAN-Pi') && (! github.event.pull_request.head.repo.fork) }}
name: Post Workflow Status to Slack
needs:
- python
runs-on: "ubuntu-26.04"
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}