Skip to content

Commit 619a6bf

Browse files
Add pytest CI for utils/matrix-logic tests on PR changes (#183)
* Initial plan * Add CI workflow to test matrix-logic on PR changes Co-authored-by: functionstackx <47992694+functionstackx@users.noreply.github.com> * Add explicit permissions to workflow for security Co-authored-by: functionstackx <47992694+functionstackx@users.noreply.github.com> * add new line test * Skip workflow on draft PRs Co-authored-by: functionstackx <47992694+functionstackx@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: functionstackx <47992694+functionstackx@users.noreply.github.com>
1 parent aab9482 commit 619a6bf

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test Matrix Logic
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'utils/matrix-logic/**'
7+
8+
jobs:
9+
test:
10+
if: github.event.pull_request.draft != true
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.12'
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install pytest pydantic pyyaml
28+
29+
- name: Run pytest
30+
run: |
31+
cd utils/matrix-logic
32+
pytest test_generate_sweep_configs.py -v

utils/matrix-logic/get_test_sweep_configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,4 @@ def main():
148148
return matrix_values
149149

150150
if __name__ == "__main__":
151-
main()
151+
main()

0 commit comments

Comments
 (0)