Skip to content

Commit 5b60930

Browse files
committed
Add github action for running tests
1 parent 2950977 commit 5b60930

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: [main]
5+
paths-ignore: ['*.md', '.gitignore']
6+
pull_request:
7+
types: [opened, synchronize, labeled]
8+
branches: [main]
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
if: github.event_name == 'push' ||
13+
((github.event.action == 'opened' || github.event.action == 'synchronize') && contains(github.event.pull_request.labels, 'READY TO TEST')) ||
14+
(github.event.action == 'labeled' && github.event.label.name == 'READY TO TEST')
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
18+
with:
19+
cache: 'pip'
20+
- run: |
21+
python -m pip install --upgrade pip
22+
python -m pip install .[dev]
23+
- name: Test with pytest and python version
24+
run: pytest -p no:sugar --cov=streamdeck --cov-report=xml --cov-report=html --cov-report=term --junit-xml=reports/xunit-results.xml
25+
- name: Upload test coverage reports to artifacts
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: test-coverage-reports
29+
path: reports/
30+
if: ${{ always() }}

0 commit comments

Comments
 (0)