From f2a14467b2401759e570edecfe98e035ead3e29d Mon Sep 17 00:00:00 2001 From: timmy Date: Tue, 4 Aug 2026 14:59:22 +0000 Subject: [PATCH] fix: use Gitea-compatible artifact upload --- .gitea/workflows/ci.yml | 2 +- tests/test_ci_workflow.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tests/test_ci_workflow.py diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ec77541..253a37b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -25,5 +25,5 @@ jobs: - name: Pack frontend run: tar -czf frontend.tar.gz frontend - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: { name: frontend, path: frontend.tar.gz } diff --git a/tests/test_ci_workflow.py b/tests/test_ci_workflow.py new file mode 100644 index 0000000..2a5b2ac --- /dev/null +++ b/tests/test_ci_workflow.py @@ -0,0 +1,17 @@ +from pathlib import Path + + +WORKFLOW = Path(".gitea/workflows/ci.yml") + + +def test_ci_uses_gitea_compatible_artifact_action(): + text = WORKFLOW.read_text() + assert "actions/upload-artifact@v4" not in text + assert "actions/upload-artifact@v3" in text + + +def test_ci_installs_declared_requirements_before_tests(): + text = WORKFLOW.read_text() + install = text.index("pip install -r requirements.txt") + tests = text.index("python3 -m pytest tests/ -q") + assert install < tests