Skip to content

Deprecating Legacy Devices #49773

Deprecating Legacy Devices

Deprecating Legacy Devices #49773

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
concurrency:
group: unit-tests-${{ github.ref }}
cancel-in-progress: true
env:
DEPS_BRANCH: bot/stable-deps-update
jobs:
tests:
uses: ./.github/workflows/interface-unit-tests.yml
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
with:
branch: ${{ github.ref }}
# Run a 'lightened' version of the CI on Pull Requests by default
# Unless the label `ci:run-full-test-suite` is attached to the PR.
# Always runs the full suite for push events.
run_lightened_ci: >-
${{
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.labels.*.name, 'ci:run-full-test-suite')
|| false
}}
upload-stable-deps:
needs: tests
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master
- name: Prepare local repo
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
if git ls-remote --exit-code origin "refs/heads/${{ env.DEPS_BRANCH }}"; then
git checkout "${{ env.DEPS_BRANCH }}"
else
git checkout -b "${{ env.DEPS_BRANCH }}"
fi
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: frozen-*
path: .github/stable/
merge-multiple: true
- name: Determine if changes have been made
id: changed
run: |
echo "has_changes=$(git status --porcelain | wc -l | awk '{print $1}')" >> $GITHUB_OUTPUT
- name: Stage changes
if: steps.changed.outputs.has_changes != '0'
run: |
git add .github/stable/
git commit -m "Update changed dependencies"
git push -f --set-upstream origin "${{ env.DEPS_BRANCH }}"
# Create PR to master
- name: Create pull request
if: steps.changed.outputs.has_changes != '0'
uses: repo-sync/pull-request@v2
with:
source_branch: "${{ env.DEPS_BRANCH }}"
destination_branch: "master"
github_token: "${{ secrets.GITHUB_TOKEN }}"
pr_title: "Update stable dependency files"
# if updating the pr_body, please also update the same text in the docs.yml file
pr_body: |
Automatic update of stable requirement files to snapshot valid python environments.
Because bots are not able to trigger CI on their own, please do so by pushing an empty commit to this branch using the following command:
```
git commit --allow-empty -m 'trigger ci'
```
Alternatively, wait for this branch to be out-of-date with master, then just use the "Update branch" button!
Note that it is expected that the PennyLane-Lightning repo is a version ahead of the release, because the
version number is taken from the dev branch. Trying to `pip install` from the files will fail until that
major version of Lightning is released.
If pip install fails with a not found error when installing because of this, it can be fixed by manually
downgrading the PennyLane-Lightning version number in the file by 1 version and trying again.
pr_allow_empty: false
pr_draft: false