|
10 | 10 | - tests/integration/data/** |
11 | 11 | - pyproject.toml |
12 | 12 | - poetry.lock |
| 13 | + - tox.ini |
13 | 14 | - .github/workflows/contrib-tests.yml |
14 | 15 | pull_request: |
15 | 16 | types: [opened, synchronize] |
|
21 | 22 | - tests/integration/data/** |
22 | 23 | - pyproject.toml |
23 | 24 | - poetry.lock |
| 25 | + - tox.ini |
24 | 26 | - .github/workflows/contrib-tests.yml |
25 | 27 |
|
26 | 28 | concurrency: |
@@ -128,44 +130,36 @@ jobs: |
128 | 130 | with: |
129 | 131 | poetry-version: "2.3.1" |
130 | 132 |
|
131 | | - - name: Configure poetry |
132 | | - run: poetry config virtualenvs.in-project true |
133 | | - |
134 | 133 | - name: Set up cache |
135 | 134 | uses: actions/cache@v5 |
136 | 135 | id: cache |
137 | 136 | with: |
138 | 137 | path: | |
139 | 138 | ~/.cache/pypoetry |
140 | 139 | ~/.cache/pip |
141 | | - key: deps-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ matrix.target.label }}-${{ hashFiles('**/poetry.lock') }} |
| 140 | + key: deps-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ matrix.target.label }}-${{ hashFiles('**/poetry.lock', 'tox.ini') }} |
142 | 141 | restore-keys: | |
143 | 142 | deps-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ matrix.target.label }}- |
144 | 143 | deps-${{ runner.os }}-${{ matrix.python-version }}- |
145 | 144 |
|
146 | | - - name: Install dependencies |
147 | | - run: poetry install --extras "${{ matrix.target.contrib }}" |
148 | | - |
149 | | - - name: Install framework variant |
150 | | - if: matrix.target.spec != '' |
151 | | - run: poetry run pip install --upgrade --force-reinstall --no-cache-dir "${{ matrix.target.contrib }}${{ matrix.target.spec }}" |
| 145 | + - name: Install tox |
| 146 | + run: python -m pip install tox |
152 | 147 |
|
153 | | - - name: Validate environment |
154 | | - run: | |
155 | | - poetry run python -m pip check |
156 | | - poetry run python -c "import importlib; name='${{ matrix.target.contrib }}'; mod = importlib.import_module(name); print(name, getattr(mod, '__version__', 'unknown'))" |
157 | | -
|
158 | | - - name: Test |
| 148 | + - name: Build tox test paths |
159 | 149 | shell: bash |
160 | | - env: |
161 | | - PYTEST_ADDOPTS: "--color=yes" |
162 | 150 | run: | |
163 | 151 | paths=("${{ matrix.target.integration_path }}") |
164 | 152 | unit_path="${{ matrix.target.unit_path }}" |
165 | 153 | if [ -d "$unit_path" ]; then |
166 | 154 | paths+=("$unit_path") |
167 | 155 | fi |
168 | | - poetry run pytest "${paths[@]}" |
| 156 | + printf "CONTRIB_PATHS=%s\n" "${paths[*]}" >> "$GITHUB_ENV" |
| 157 | +
|
| 158 | + - name: Test |
| 159 | + env: |
| 160 | + CONTRIB_PACKAGE: ${{ matrix.target.contrib }} |
| 161 | + CONTRIB_SPEC: ${{ matrix.target.spec }} |
| 162 | + run: tox -e contrib |
169 | 163 |
|
170 | 164 | - name: Upload coverage |
171 | 165 | uses: codecov/codecov-action@v5 |
|
0 commit comments