last modified added #1491
Workflow file for this run
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: Dalgo CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| checks: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: ddp | |
| POSTGRES_PASSWORD: ${{ secrets.CI_DBPASSWORD }} | |
| POSTGRES_DB: ${{ secrets.CI_DBNAME }} | |
| ports: | |
| - 5432:5432 | |
| options: --health-cmd "pg_isready -U ddp" --health-interval 10s --health-timeout 5s --health-retries 5 | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] # we should tighten this to work with multiple versions of python | |
| redis-version: [6] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| - name: Run pre-commit | |
| run: uv run pre-commit run --all-files | |
| - name: Start Redis | |
| uses: supercharge/redis-github-action@1.8.1 | |
| with: | |
| redis-version: ${{ matrix.redis-version }} | |
| - name: Create logs directory | |
| run: mkdir -p ddpui/logs | |
| - name: Apply database migrations | |
| env: | |
| DBHOST: localhost | |
| DBPORT: 5432 | |
| DBNAME: ${{ secrets.CI_DBNAME }} | |
| DBUSER: ddp | |
| DBPASSWORD: ${{ secrets.CI_DBPASSWORD }} | |
| DJANGOSECRET: "some-secret-key" | |
| run: | | |
| uv run python manage.py migrate | |
| - name: Test with pytest | |
| env: | |
| AIRBYTE_SERVER_HOST: localhost | |
| AIRBYTE_SERVER_PORT: 8001 | |
| AIRBYTE_SERVER_APIVER: v1 | |
| AIRBYTE_API_TOKEN: ${{ secrets.AIRBYTE_API_TOKEN }} | |
| DBHOST: localhost | |
| DBPORT: 5432 | |
| DBNAME: ${{ secrets.CI_DBNAME }} | |
| DBUSER: ddp | |
| DBPASSWORD: ${{ secrets.CI_DBPASSWORD }} | |
| PREFECT_PROXY_API_URL: http://localhost:8080 | |
| DEV_SECRETS_DIR: /tmp/ | |
| CLIENTDBT_ROOT: /tmp | |
| DJANGOSECRET: "some-secret-key" | |
| run: | | |
| uv run coverage run -m pytest --ignore=ddpui/tests/integration_tests --durations=20 | |
| uv run coverage xml | |
| - name: Upload coverage reports to codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| - name: Check coverage percentage | |
| run: | | |
| uv run coverage report --fail-under=55 |