add upload step
This commit is contained in:
@@ -17,3 +17,40 @@ jobs:
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
verify-artifact-upload:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 2
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: https://gitea.com/actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://git.nova.org
|
||||
|
||||
- name: Create Python environment
|
||||
run: |
|
||||
python3 -m venv .venv
|
||||
|
||||
- name: Diagnostic -- guarantee real content in test-results/
|
||||
# Runs regardless of earlier step outcomes, so the upload step
|
||||
# below always has something real to upload. Isolates whether
|
||||
# gitea-upload-artifact itself works from whether the pytest step
|
||||
# (or an earlier setup step) is what's actually failing.
|
||||
if: always()
|
||||
run: |
|
||||
mkdir -p test-results
|
||||
echo "diagnostic content $(date -u)" > test-results/diagnostic.txt
|
||||
|
||||
- name: Run the intentionally-failing verification test
|
||||
run: |
|
||||
.venv/bin/python -m pytest tests/test_zz_temp_verify_artifact_upload.py \
|
||||
--tracing=retain-on-failure \
|
||||
--screenshot=only-on-failure
|
||||
|
||||
- name: Upload failure artifacts
|
||||
if: failure()
|
||||
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
||||
with:
|
||||
name: test-results
|
||||
path: test-results/
|
||||
retention-days: 1
|
||||
|
||||
Reference in New Issue
Block a user