chore(): remove empty code change entries from the changelog #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Backend Tests | |
| on: | |
| push: | |
| branches: [ main, develop, backend ] | |
| paths: | |
| - 'backend/**' | |
| - '.github/workflows/backend-tests.yml' | |
| pull_request: | |
| branches: [ main, develop, backend ] | |
| paths: | |
| - 'backend/**' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: exploitrag_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| working-directory: ./backend | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Create .env.test file | |
| working-directory: ./backend | |
| run: | | |
| cp .env.test.example .env.test || cp .env.test .env | |
| continue-on-error: true | |
| - name: Run linting | |
| working-directory: ./backend | |
| run: | | |
| pip install black ruff | |
| black --check app tests | |
| ruff check app tests | |
| continue-on-error: true | |
| - name: Run tests with coverage | |
| working-directory: ./backend | |
| env: | |
| DATABASE_URL: postgresql+asyncpg://postgres:postgres@localhost:5432/exploitrag_test | |
| REDIS_URL: redis://localhost:6379/1 | |
| JWT_SECRET_KEY: test-secret-key-for-ci | |
| ENVIRONMENT: test | |
| run: | | |
| pytest --cov=app --cov-report=xml --cov-report=term-missing -v | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./backend/coverage.xml | |
| flags: backend | |
| name: backend-coverage | |
| continue-on-error: true | |
| - name: Generate coverage badge | |
| if: github.ref == 'refs/heads/main' | |
| uses: cicirello/jacoco-badge-generator@v2 | |
| with: | |
| jacoco-csv-file: ./backend/coverage.xml | |
| continue-on-error: true | |
| - name: Test Summary | |
| if: always() | |
| run: | | |
| echo "### Test Results :test_tube:" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Tests completed for backend" >> $GITHUB_STEP_SUMMARY |