From fd934c006d154908e76dcf79e10a7ff33e36b744 Mon Sep 17 00:00:00 2001 From: agentbox Date: Fri, 31 Jul 2026 22:14:55 +0000 Subject: [PATCH] Add Gitea Actions CI: run tests, package artifact zip on push --- .gitea/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 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..5bbc40f --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: [main] + +jobs: + test-and-package: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run tests + run: python -m pytest tests/ -v + + - name: Package artifact + run: | + zip -r meal-tracker.zip . \ + -x ".git/*" \ + -x ".gitea/*" \ + -x ".env" \ + -x "docker-compose.yml" \ + -x ".pytest_cache/*" \ + -x "__pycache__/*" \ + -x "meals.db" + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: meal-tracker + path: meal-tracker.zip