diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fed42f026..91014ccbf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,17 +42,23 @@ jobs: run: rm -rf /home/runner/.cache/pyglossary/test || true - name: Run tests run: | - set -o pipefail + set -x set +e export NO_CLEANUP=1 + set -o pipefail bash ./scripts/test.sh 2>&1 | tee test.out - mkdir upload - cp test.out upload/ - grep -o "'/tmp/pyglossary/[^']*'" test.out | sed "s/'//g" | xargs '-I{}' cp '{}' upload - ls -l upload + STATUS=$? + set +o pipefail + ARTIFACTS=test-artifacts + mkdir $ARTIFACTS + cp test.out $ARTIFACTS + grep -o "'/tmp/pyglossary/[^']*'" test.out | sed "s/'//g" | xargs '-I{}' cp '{}' $ARTIFACTS + ls -l $ARTIFACTS + set -e + exit $STATUS - name: Upload test artifacts if: always() uses: actions/upload-artifact@v4 with: - name: upload - path: upload/ + name: test-artifacts-{{ github.sha }}-py${{ matrix.python-version }} + path: test-artifacts