From 053a9988a8a6126dcb8f33877bbf5383705d148b Mon Sep 17 00:00:00 2001 From: zwitschi Date: Sat, 1 Nov 2025 18:07:57 +0100 Subject: [PATCH] feat: add CI pipeline --- .gitea/workflows/ci.yml | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 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..3b749eb --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,56 @@ +name: CI/CD Pipeline + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests + run: | + python -m pytest tests/ -v + + - name: Run linting + run: | + python -m flake8 web/ tests/ --max-line-length=120 + + - name: Build Docker image + run: | + docker build -t jobs-app . + + - name: Run container tests + run: | + docker run --rm jobs-app python -m pytest tests/ -v + + deploy: + runs-on: ubuntu-latest + needs: test + if: github.ref == 'refs/heads/main' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Deploy to production + run: | + echo "Deploying to production..." + # Add your deployment commands here + # For example: docker-compose up -d