Skip to content

Run full tests only on Wednesday scheduled jobs #1833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,15 @@ jobs:
pip install dist/*

# Run the tests
- name: Test with pytest
- name: Run tests
if: github.event_name != 'schedule'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if statement means the tests won't be run in daily jobs, which is not what we want. However, removing this if statement means on Wednesday job, most tests will be run twice by both make test and make fulltest.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about something like

Suggested change
if: github.event_name != 'schedule'
if: github.event.schedule != '0 0 * * 3'

Though not sure if it will error for regular (non-scheduled) tests, e.g. in PRs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No errors in PRs.

run: make test PYTEST_EXTRA="-r P"

# Run full tests including doctests
- name: Run full tests
if: github.event_name == 'schedule'
Copy link
Member

@weiji14 weiji14 May 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if GitHub Actions uses & or and, but try something like this to run full tests on Wednesday only. Xref https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule

Suggested change
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' && github.event.schedule == '0 0 * * 3'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if GitHub Actions uses & or and,

It's && (https://docs.github.com/en/actions/learn-github-actions/expressions#operators).

run: make fulltest PYTEST_EXTRA="-r P"

# Upload diff images on test failure
- name: Upload diff images if any test fails
uses: actions/upload-artifact@v2
Expand Down