Skip to content

Commit c60646c

Browse files
authored
infra: set up extended testing (#3)
* set up extended testing * update py versions
1 parent 3c79c98 commit c60646c

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/scripts/check_diff.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
outputs = {
4343
"dirs-to-lint": list(dirs_to_run["lint"] | dirs_to_run["test"]),
4444
"dirs-to-test": list(dirs_to_run["test"]),
45+
"extended-tests": [
46+
{"working-directory": "libs/community", "python-version": py_v}
47+
for py_v in ["3.9", "3.12"]
48+
],
4549
}
4650
for key, value in outputs.items():
4751
json_output = json.dumps(value)

.github/workflows/check_diffs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
outputs:
3737
dirs-to-lint: ${{ steps.set-matrix.outputs.dirs-to-lint }}
3838
dirs-to-test: ${{ steps.set-matrix.outputs.dirs-to-test }}
39+
extended-tests: ${{ steps.set-matrix.outputs.extended-tests }}
3940
lint:
4041
name: cd ${{ matrix.working-directory }}
4142
needs: [ build ]
@@ -71,6 +72,50 @@ jobs:
7172
with:
7273
working-directory: ${{ matrix.working-directory }}
7374
secrets: inherit
75+
76+
extended-tests:
77+
name: "cd ${{ matrix.job-configs.working-directory }} / make extended_tests #${{ matrix.job-configs.python-version }}"
78+
needs: [ build ]
79+
if: ${{ needs.build.outputs.extended-tests != '[]' }}
80+
strategy:
81+
matrix:
82+
# note different variable for extended test dirs
83+
job-configs: ${{ fromJson(needs.build.outputs.extended-tests) }}
84+
fail-fast: false
85+
runs-on: ubuntu-latest
86+
timeout-minutes: 20
87+
defaults:
88+
run:
89+
working-directory: ${{ matrix.job-configs.working-directory }}
90+
steps:
91+
- uses: actions/checkout@v4
92+
93+
- name: Set up Python ${{ matrix.job-configs.python-version }} + uv
94+
uses: "./.github/actions/uv_setup"
95+
with:
96+
python-version: ${{ matrix.job-configs.python-version }}
97+
98+
- name: Install dependencies and run extended tests
99+
shell: bash
100+
run: |
101+
echo "Running extended tests, installing dependencies with uv..."
102+
uv venv
103+
uv sync --group test
104+
VIRTUAL_ENV=.venv uv pip install -r extended_testing_deps.txt
105+
VIRTUAL_ENV=.venv make extended_tests
106+
107+
- name: Ensure the tests did not create any additional files
108+
shell: bash
109+
run: |
110+
set -eu
111+
112+
STATUS="$(git status)"
113+
echo "$STATUS"
114+
115+
# grep will exit non-zero if the target message isn't found,
116+
# and `set -e` above will cause the step to fail.
117+
echo "$STATUS" | grep 'nothing to commit, working tree clean'
118+
74119
ci_success:
75120
name: "CI Success"
76121
needs: [build, lint, test, compile-integration-tests]

0 commit comments

Comments
 (0)