Skip to content

Commit

Permalink
Add scheduled nightly tests on github CI (#687)
Browse files Browse the repository at this point in the history
Runs the full unit test suite nightly to track CI failures

---------

Signed-off-by: Peter St. John <pstjohn@nvidia.com>
  • Loading branch information
pstjohn authored Feb 12, 2025
1 parent 486fd57 commit a1ef9ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
python-version: 3.x
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches: [main]
merge_group:
types: [checks_requested]
schedule:
- cron: '0 7 * * *' # Runs at 7 AM UTC daily (12 AM MST)

defaults:
run:
Expand Down Expand Up @@ -123,34 +125,34 @@ jobs:

- name: Run slow tests
if: |
github.event_name == 'merge_group' ||
github.event_name == 'merge_group' || github.event_name == 'schedule' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'INCLUDE_SLOW_TESTS'))
env:
BIONEMO_DATA_SOURCE: ngc
run: pytest -v -m "slow" sub-packages/

- name: Run notebook tests
if: |
github.event_name == 'merge_group' ||
github.event_name == 'merge_group' || github.event_name == 'schedule' ||
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'INCLUDE_NOTEBOOKS_TESTS'))
env:
BIONEMO_DATA_SOURCE: ngc
run: pytest -v --nbval-lax -p no:python docs/ sub-packages/

- name: Upload coverage to Codecov
# Don't run coverage on merge queue CI to avoid duplicating reports
# Don't run coverage on merge queue or nightly CI to avoid duplicating reports
# to codecov. See https://github.com/matplotlib/napari-matplotlib/issues/155
if: github.event_name != 'merge_group'
if: github.event_name != 'merge_group' && github.event_name != 'schedule'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: ${{ github.run_id }}

- name: Upload test results to Codecov
# Don't run coverage on merge queue CI to avoid duplicating reports
# Don't run coverage on merge queue or nightly CI to avoid duplicating reports
# to codecov. See https://github.com/matplotlib/napari-matplotlib/issues/155
if: ${{ !cancelled() && github.event_name != 'merge_group' }}
if: ${{ !cancelled() && github.event_name != 'merge_group' && github.event_name != 'schedule' }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down

0 comments on commit a1ef9ba

Please sign in to comment.