Skip to content

Commit b574f04

Browse files
authored
Update GitHub Actions workflow for Python tests
Refactor CI workflow to simplify testing and remove unused steps.
1 parent 222374a commit b574f04

1 file changed

Lines changed: 21 additions & 32 deletions

File tree

.github/workflows/tests.yml

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,37 @@
1-
name: Tests
1+
name: Python Tests
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches: [ main ]
66
pull_request:
77
branches: [ main ]
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12-
13-
strategy:
14-
matrix:
15-
python-version: ["3.10", "3.11", "3.12"]
16-
12+
1713
steps:
1814
- uses: actions/checkout@v4
19-
20-
- name: Set up Python ${{ matrix.python-version }}
15+
16+
- name: Set up Python
2117
uses: actions/setup-python@v5
2218
with:
23-
python-version: ${{ matrix.python-version }}
24-
25-
- name: Install Python dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install -e ".[dev]"
29-
30-
- name: Run tests
19+
python-version: '3.12' # Use a stable version for CI reliability
20+
21+
- name: Install System Dependencies
3122
run: |
32-
pytest -v --cov=src/pipewire_controller --cov-report=xml --cov-report=term-missing
33-
34-
- name: Upload coverage to Codecov
35-
uses: codecov/codecov-action@v4
36-
with:
37-
file: ./coverage.xml
38-
flags: unittests
39-
name: codecov-umbrella
40-
fail_ci_if_error: false
41-
42-
- name: Run linting
23+
sudo apt-get update
24+
# Install pipewire-bin to provide the pw-metadata and pw-dump binaries
25+
sudo apt-get install -y pipewire-bin
26+
27+
- name: Install Python Dependencies
4328
run: |
44-
ruff check src/ tests/
45-
46-
- name: Check formatting
29+
python -m pip install --upgrade pip
30+
pip install pytest pytest-mock
31+
pip install -e .
32+
33+
- name: Run Tests
4734
run: |
48-
black --check src/ tests/
35+
# We no longer need xvfb-run because we refactored to engine-only testing!
36+
export PYTHONPATH=$PYTHONPATH:$(pwd)/src
37+
pytest tests/test_engine.py

0 commit comments

Comments
 (0)