fix(ci): do not fail Gitea Actions on artifact/Codecov steps
ai-news-writer-ci / test (pull_request) Successful in 44s

act_runner often cannot complete actions/upload-artifact@v3; treat upload and
Codecov as optional. Require coverage/lcov.info after tests so quality gate stays
strict. Harden PyYAML install for workflow parse step (PEP 668 / user site).
This commit is contained in:
David Santos committed 2026-05-01 20:43:34 +01:00
1 parent a24fdef09a
commit 616f8b0f52
1 file changed
+11 -2
+11 -2
View File
@@ -60,14 +60,21 @@ jobs:
- name: Run tests with coverage
run: npm test
# Gitea Actions (forge) does not support upload-artifact@v4+ (GHES limitation in act runner).
- name: Verify coverage output
run: test -f coverage/lcov.info
# Gitea Actions / act_runner: upload-artifact@v4+ is unsupported; v3 can still fail on some
# runners. Coverage is already enforced by the step above; do not fail the merge gate on upload.
- name: Upload coverage artifact (lcov)
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: coverage-lcov
path: coverage/lcov.info
# Optional external upload — must not block CI when forge networking or Codecov is flaky.
- name: Codecov upload (optional — Gitea secret CODECOV_TOKEN)
continue-on-error: true
# Injects CODECOV_TOKEN from Gitea repository secrets
# If secret is not configured, this step gracefully skips upload
env:
@@ -88,7 +95,9 @@ jobs:
- name: Workflow YAML parses
run: |
python3 -m pip install --disable-pip-version-check --quiet pyyaml --break-system-packages
set -euo pipefail
python3 -m pip install --disable-pip-version-check --quiet pyyaml --break-system-packages \
|| python3 -m pip install --disable-pip-version-check --quiet --user pyyaml
python3 -c "import yaml; yaml.safe_load(open('.gitea/workflows/test.yml'))"
python3 -c "import yaml; yaml.safe_load(open('.gitea/workflows/deploy-staging.yml'))"
python3 -c "import yaml; yaml.safe_load(open('.gitea/workflows/deploy-production.yml'))"