Skip to content

Commit

Permalink
Update stable dependencies on schedule (#6164)
Browse files Browse the repository at this point in the history
As name says. Currently, every time stable dependencies change (every
time a PR is merged to master), an automatic PR is opened to update the
dependencies. It can be quite annoying to merge a PR and then another
one gets opened immediately afterwards. Thus, this changes the test
workflows to run them on a weekly schedule, and a PR to update stable
dependencies is only opened if the test workflow is triggered by the
schedule.

All changes have been implemented by @timmysilv . I'm just the
messenger.

---------

Co-authored-by: Matthew Silverman <[email protected]>
  • Loading branch information
mudit2812 and timmysilv authored Aug 28, 2024
1 parent 002a807 commit 2fc4e22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/interface-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
install_pennylane_lightning_master: true
pytest_coverage_flags: ${{ inputs.pytest_coverage_flags }}
pytest_markers: torch and not qcut and not finite-diff and not param-shift
requirements_file: ${{ strategy.job-index == 0 && 'torch.txt' || '' }}
requirements_file: ${{ github.event_name == 'schedule' && strategy.job-index == 0 && 'torch.txt' || '' }}
disable_new_opmath: ${{ inputs.disable_new_opmath }}


Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
pytest_markers: tf and not qcut and not finite-diff and not param-shift
pytest_additional_args: --splits 3 --group ${{ matrix.group }} --durations-path='.github/workflows/tf_tests_durations.json'
additional_pip_packages: pytest-split
requirements_file: ${{ strategy.job-index == 0 && 'tf.txt' || '' }}
requirements_file: ${{ github.event_name == 'schedule' && strategy.job-index == 0 && 'tf.txt' || '' }}
disable_new_opmath: ${{ inputs.disable_new_opmath }}


Expand Down Expand Up @@ -263,7 +263,7 @@ jobs:
pytest_markers: jax and not qcut and not finite-diff and not param-shift
pytest_additional_args: --splits 5 --group ${{ matrix.group }} --durations-path='.github/workflows/jax_tests_durations.json'
additional_pip_packages: pytest-split
requirements_file: ${{ strategy.job-index == 0 && 'jax.txt' || '' }}
requirements_file: ${{ github.event_name == 'schedule' && strategy.job-index == 0 && 'jax.txt' || '' }}
disable_new_opmath: ${{ inputs.disable_new_opmath }}


Expand Down Expand Up @@ -299,7 +299,7 @@ jobs:
pytest_markers: core and not qcut and not finite-diff and not param-shift
pytest_additional_args: --splits 5 --group ${{ matrix.group }} --durations-path='.github/workflows/core_tests_durations.json'
additional_pip_packages: pytest-split
requirements_file: ${{ strategy.job-index == 0 && 'core.txt' || '' }}
requirements_file: ${{ github.event_name == 'schedule' && strategy.job-index == 0 && 'core.txt' || '' }}
disable_new_opmath: ${{ inputs.disable_new_opmath }}


Expand Down Expand Up @@ -332,7 +332,7 @@ jobs:
install_pennylane_lightning_master: true
pytest_coverage_flags: ${{ inputs.pytest_coverage_flags }}
pytest_markers: all_interfaces
requirements_file: ${{ strategy.job-index == 0 && 'all_interfaces.txt' || '' }}
requirements_file: ${{ github.event_name == 'schedule' && strategy.job-index == 0 && 'all_interfaces.txt' || '' }}
disable_new_opmath: ${{ inputs.disable_new_opmath }}


Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:
pytest_coverage_flags: ${{ inputs.pytest_coverage_flags }}
pytest_markers: external
additional_pip_packages: pyzx pennylane-catalyst matplotlib stim quimb
requirements_file: ${{ strategy.job-index == 0 && 'external.txt' || '' }}
requirements_file: ${{ github.event_name == 'schedule' && strategy.job-index == 0 && 'external.txt' || '' }}
disable_new_opmath: ${{ inputs.disable_new_opmath }}


Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- synchronize
- ready_for_review
- labeled
# Scheduled trigger on Monday at 2:47am UTC
schedule:
- cron: '47 2 * * 1'

concurrency:
group: unit-tests-${{ github.ref }}
Expand Down

0 comments on commit 2fc4e22

Please sign in to comment.