Skip to content

Commit 0b77a5c

Browse files
committed
Update pytest command options in single-postgres.yml to include --basetemp for improved temporary directory handling
- Added the --basetemp option to pytest commands to specify a base temporary directory, enhancing the management of test artifacts during execution. - Simplified the upload path for pytest results to focus on the temporary runner directory, ensuring efficient artifact collection.
1 parent 9de133b commit 0b77a5c

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/single-postgres.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,16 @@ jobs:
100100
- name: Run test
101101
uses: fizyk/actions-reuse/.github/actions/pipenv-run@v4.1.1
102102
with:
103-
command: pytest -svv -p no:xdist --postgresql-exec="${{ env.POSTGRESQL_EXEC }}" -k "not docker" --cov-report=xml
103+
command: pytest -svv -p no:xdist --postgresql-exec="${{ env.POSTGRESQL_EXEC }}" -k "not docker" --cov-report=xml --basetemp="${{ runner.temp }}"
104104
- name: Run xdist test
105105
uses: fizyk/actions-reuse/.github/actions/pipenv-run@v4.1.1
106106
with:
107-
command: pytest -n auto --dist loadgroup --max-worker-restart 0 --postgresql-exec="${{ env.POSTGRESQL_EXEC }}" -k "not docker" --cov-report=xml:coverage-xdist.xml
107+
command: pytest -n auto --dist loadgroup --max-worker-restart 0 --postgresql-exec="${{ env.POSTGRESQL_EXEC }}" -k "not docker" --cov-report=xml:coverage-xdist.xml --basetemp="${{ runner.temp }}"
108108
- uses: actions/upload-artifact@v6
109109
if: failure()
110110
with:
111111
name: postgresql-${{ matrix.python-version }}-${{ inputs.postgresql }}
112-
path: |
113-
/tmp/pytest-of-runner/**
114-
${{ runner.temp }}/pytest-of-runner/**
112+
path: ${{ runner.temp }}/pytest-of-*/**
115113
- name: Upload coverage to Codecov
116114
uses: codecov/codecov-action@v5.5.2
117115
with:

0 commit comments

Comments
 (0)