Skip to content

Commit

Permalink
Run fast tests for pushes and fast+slow for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
famura committed Mar 25, 2024
1 parent f3a15bf commit 67bfef5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ jobs:
run: |
pyright sbi
- name: Run the fast and the slow tests with coverage
- name: Run the fast and the slow CPU tests with coverage
run: |
pytest -n auto -v -m "not gpu" --cov=sbi --cov-report=xml --exitfirst tests/
pytest -v -x -n auto -m "not gpu" --cov=sbi --cov-report=xml tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4-beta
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Continuous Integration

on: [pull_request, workflow_dispatch]
on: [push, pull_request, workflow_dispatch]

defaults:
run:
Expand Down Expand Up @@ -64,15 +64,22 @@ jobs:
run: |
pyright sbi
- name: Run the fast tests with coverage
- name: Run the fast CPU tests without coverage
if: github.event_name == 'push'
run: |
pytest -n auto -v -m "not slow and not gpu" --cov=sbi --cov-report=xml --exitfirst tests/
pytest -v -x -n auto -m "not slow and not gpu" tests/
- name: Run the fast and the slow CPU tests with coverage
if: github.event_name == 'pull_request'
run: |
pytest -v -x -n auto -v -m "not gpu" --cov=sbi --cov-report=xml tests/
- name: Upload coverage to Codecov
if: github.event_name == 'pull_request'
uses: codecov/codecov-action@v4
with:
env_vars: OS,PYTHON
file: ./coverage.xml
flags: unittests
name: codecov-sbi-fast-cpu
name: codecov-sbi-all-cpu
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 67bfef5

Please sign in to comment.