Skip to content

Commit 61224ae

Browse files
committed
fix(ci): update triggers to main, add needs:lint, add format check, deduplicate pytest
1 parent 6f9ee0b commit 61224ae

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
pull_request:
7-
branches: [master]
7+
branches: [main]
88

99
jobs:
1010
lint:
@@ -16,8 +16,10 @@ jobs:
1616
python-version: "3.12"
1717
- run: pip install ruff
1818
- run: ruff check src/ tests/
19+
- run: ruff format --check src/ tests/
1920

2021
test:
22+
needs: lint
2123
runs-on: ubuntu-latest
2224
strategy:
2325
matrix:
@@ -31,10 +33,7 @@ jobs:
3133
run: |
3234
pip install pynvml psutil click pyyaml rich prometheus-client pytest pytest-cov ruff
3335
- name: Run tests
34-
run: pytest tests/ -v --tb=short
35-
- name: Run tests with JUnit output
36-
if: always()
37-
run: pytest tests/ --junitxml=test-results.xml --tb=short
36+
run: pytest tests/ -v --tb=short --junitxml=test-results.xml
3837
- name: Upload test results
3938
if: always()
4039
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)