From 1e08b9f80c038fb534590ba2268f244e30d6befb Mon Sep 17 00:00:00 2001 From: math974 Date: Fri, 24 Oct 2025 17:55:02 +0200 Subject: [PATCH] fix(CI/CD): remove test --- .github/workflows/deploy-prod-unified.yml | 6 +- .github/workflows/test.yml | 98 ----------------------- 2 files changed, 3 insertions(+), 101 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/deploy-prod-unified.yml b/.github/workflows/deploy-prod-unified.yml index 060b250..514ee28 100644 --- a/.github/workflows/deploy-prod-unified.yml +++ b/.github/workflows/deploy-prod-unified.yml @@ -66,7 +66,7 @@ jobs: run: | cd terraform terraform init \ - -backend-config=../configs/prod.config + -backend-config=../configs/prd.config - name: Terraform Format Check run: | @@ -115,7 +115,7 @@ jobs: run: | cd terraform terraform init \ - -backend-config=../configs/prod.config + -backend-config=../configs/prd.config - name: Terraform Plan (env prod) run: | @@ -161,7 +161,7 @@ jobs: run: | cd terraform terraform init \ - -backend-config=../configs/prod.config + -backend-config=../configs/prd.config - name: Terraform Apply (env prod) run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 2cafde0..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Test and Quality Checks - -on: - pull_request: - branches: [ main, develop ] - push: - branches: [ main, develop ] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - name: Cache pip dependencies - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('app/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Install dependencies - run: | - cd app - pip install -r requirements.txt - pip install pytest pytest-cov flake8 black - - - name: Lint with flake8 - run: | - cd app - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - - name: Format check with black - run: | - cd app - black --check . - - - name: Run tests - run: | - cd app - python -m pytest tests/ --cov=. --cov-report=xml || echo "No tests found, continuing..." - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - file: ./app/coverage.xml - flags: unittests - name: codecov-umbrella - - security-scan: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@master - with: - scan-type: 'fs' - scan-ref: '.' - format: 'sarif' - output: 'trivy-results.sarif' - - - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 - if: always() - with: - sarif_file: 'trivy-results.sarif' - - build-test: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build Docker image - run: | - cd app - docker build -t tasks-app:test . - - - name: Test Docker image - run: | - docker run --rm -d --name test-container -p 8000:8000 tasks-app:test - sleep 10 - curl -f http://localhost:8000/health || exit 1 - docker stop test-container