Run full test matrix in automated dependency update workflow with reusable workflow pattern#39
Run full test matrix in automated dependency update workflow with reusable workflow pattern#39
Conversation
Co-authored-by: Will-D-AER <197624355+Will-D-AER@users.noreply.github.com>
Co-authored-by: Will-D-AER <197624355+Will-D-AER@users.noreply.github.com>
…pdates) Co-authored-by: Will-D-AER <197624355+Will-D-AER@users.noreply.github.com>
Co-authored-by: Will-D-AER <197624355+Will-D-AER@users.noreply.github.com>
|
If this is not possible please let me know. I would like to have a consistent source of truth for my types of tests. Would this be possible? i.e. having a separate file containing the rules for the tests and our existing workflow files pointing towards this. This way the update dependency workflow can use the exact same tests used on main. @copilot |
…ruth Co-authored-by: Will-D-AER <197624355+Will-D-AER@users.noreply.github.com>
Yes, this is absolutely possible! I've implemented a reusable workflow pattern to create a single source of truth for your test configurations. Changes in commit
To modify the test matrix in the future, edit only matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12']This change automatically applies to both the CI workflow and dependency update workflow, ensuring they always use identical test configurations. |
Co-authored-by: Will-D-AER <197624355+Will-D-AER@users.noreply.github.com>
Co-authored-by: Will-D-AER <197624355+Will-D-AER@users.noreply.github.com>
Co-authored-by: Will-D-AER <197624355+Will-D-AER@users.noreply.github.com>
.github/workflows/README.md
Outdated
There was a problem hiding this comment.
Was there previously comments on the workflow in the readme. if not, then we should not add it now @copilot
There was a problem hiding this comment.
Correct, there was no README in the workflows directory before. Removed in commit 400040f.
The inline comments in test-matrix.yml still document the logic clearly.
Co-authored-by: Will-D-AER <197624355+Will-D-AER@users.noreply.github.com>
The automated dependency update workflow only ran smoke and unit tests on Ubuntu/Python 3.11, allowing broken dependencies to reach main.
Changes
Reusable Workflow Pattern (Single Source of Truth)
.github/workflows/test-matrix.ymlas a reusable workflow defining the test matrixdependencies.ymlandci.ymlto use the reusable workflowWorkflow Structure
update-and-test(matrix testing) andcreate-pr(only runs if all tests pass)fail-fast: falseto test all configurations even if one failsTest Matrix
Security
permissionsblocks (read-only for tests, write for PR creation)Documentation
test-matrix.ymlexplaining cache strategy and dependency sync logicPR Template
Reusable Workflow Usage
The test matrix is now centrally defined and can be used by any workflow:
Benefits
To add a new Python version, edit only
test-matrix.yml:Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.