From d580d6b8044ed0f639a9d81ae75f210d86d3310d Mon Sep 17 00:00:00 2001 From: Jarian Cottingham Date: Sat, 4 Jul 2026 15:27:08 +0000 Subject: [PATCH] add Gitea Actions CI workflow --- .gitea/workflows/ci.yml | 81 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..9540c4a --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,81 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: gitea/checkout@v2 + + - name: Set up Python + uses: gitea/setup-python@v2 + with: + python-version: "3.11" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff mypy + pip install -e ".[dev]" + + - name: Run ruff + run: ruff check . + + - name: Run mypy + run: mypy youtube_tui/ + + test: + runs-on: ubuntu-latest + steps: + - uses: gitea/checkout@v2 + + - name: Set up Python + uses: gitea/setup-python@v2 + with: + python-version: "3.11" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e ".[dev]" + pip install -r requirements-api.txt + + - name: Run pytest + run: python -m pytest tests/ web/server/tests/ -v --tb=short + + docker-build: + runs-on: ubuntu-latest + steps: + - uses: gitea/checkout@v2 + + - name: Build Docker image + run: | + docker build -t youtube-cli:test --no-cache . + + security: + runs-on: ubuntu-latest + steps: + - uses: gitea/checkout@v2 + + - name: Set up Python + uses: gitea/setup-python@v2 + with: + python-version: "3.11" + + - name: Run bandit (Python SAST) + run: | + pip install bandit + bandit -r youtube_cli/ youtube_tui/ web/server/ -ll + + build-result: + needs: [lint, test, docker-build, security] + runs-on: ubuntu-latest + if: always() + steps: + - name: Summary + run: echo "All CI checks completed"