From 7b0029eeccbefc90589c5134bb6ee007e57248f8 Mon Sep 17 00:00:00 2001 From: Polish Hammer Date: Tue, 21 Jul 2026 22:50:57 +0200 Subject: [PATCH] Fix workflow --- {gitea => .gihub}/workflows/ci.yml | 0 .gitea/workflows/ci.yml | 57 ++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) rename {gitea => .gihub}/workflows/ci.yml (100%) create mode 100644 .gitea/workflows/ci.yml diff --git a/gitea/workflows/ci.yml b/.gihub/workflows/ci.yml similarity index 100% rename from gitea/workflows/ci.yml rename to .gihub/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..ae90644 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,57 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + # Manual trigger: run CI on demand from the Actions tab (or `gh workflow run + # ci.yml --ref `) without pushing a commit just to see it go green. + workflow_dispatch: + +permissions: + contents: read + +jobs: + compile: + # Byte-compile every first-party .py to catch syntax errors. No deps. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: py_compile first-party sources + run: | + git ls-files '*.py' | grep -vE '^(yt_dlp|spotify_dl)/' | xargs python -m py_compile + echo "All first-party sources compile." + + unit: + # Pure-logic tests; tested modules guard heavy deps, so only pytest needed. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install test deps + run: | + python -m pip install --upgrade pip + pip install pytest + - name: Run unit tests + run: pytest tests/unit -v + + integration: + # Boot the Flask services and assert the X-Conjurer-Api-Key auth contract. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install service deps + run: | + python -m pip install --upgrade pip + pip install pytest flask waitress requests + - name: Run integration tests + run: pytest tests/integration -v