v1 Nightly code check #653
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: v1 Nightly code check | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 3 * * *' # 3 am UTC every day | |
| jobs: | |
| code-check: | |
| uses: ./.github/workflows/code-check.yml | |
| unit-tests: | |
| uses: ./.github/workflows/unit-tests.yml | |
| secrets: | |
| GIST_PAT: ${{ secrets.GIST_PAT }} | |
| security-scan: | |
| needs: [unit-tests] | |
| uses: ./.github/workflows/security-scan.yml | |
| secrets: | |
| FOSSA_TOKEN: ${{ secrets.FOSSA_TOKEN }} | |
| SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | |
| core: | |
| strategy: | |
| fail-fast: false # finish all jobs even if one fails | |
| matrix: | |
| # No windows support for core yet | |
| # Macos is missing docker support | |
| os: [ubuntu-latest] | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| uses: ./.github/workflows/integration-tests-core.yml | |
| with: | |
| os_name: ${{ matrix.os }} | |
| python_version: ${{ matrix.python-version }} | |
| sendSlackNotifications: true | |
| tests: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false # finish all jobs even if one fails | |
| max-parallel: 2 | |
| matrix: | |
| os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
| python-version: ['3.9', '3.10', '3.11'] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install ".[dev]" | |
| - name: Unit test with pytest | |
| run: | | |
| pytest tests/unit | |
| - name: Setup database and engine | |
| id: setup | |
| uses: firebolt-db/integration-testing-setup@v1 | |
| with: | |
| firebolt-username: ${{ secrets.FIREBOLT_STG_USERNAME }} | |
| firebolt-password: ${{ secrets.FIREBOLT_STG_PASSWORD }} | |
| api-endpoint: "api.staging.firebolt.io" | |
| region: "us-east-1" | |
| db_suffix: ${{ format('{0}_{1}', matrix.os, matrix.python-version) }} | |
| - name: Run integration tests | |
| env: | |
| USER_NAME: ${{ secrets.FIREBOLT_STG_USERNAME }} | |
| PASSWORD: ${{ secrets.FIREBOLT_STG_PASSWORD }} | |
| SERVICE_ID: ${{ secrets.SERVICE_ID_STG }} | |
| SERVICE_SECRET: ${{ secrets.SERVICE_SECRET_STG }} | |
| DATABASE_NAME: ${{ steps.setup.outputs.database_name }} | |
| ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} | |
| ENGINE_URL: ${{ steps.setup.outputs.engine_url }} | |
| STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} | |
| STOPPED_ENGINE_URL: ${{ steps.setup.outputs.stopped_engine_url }} | |
| ACCOUNT_NAME: "firebolt" | |
| API_ENDPOINT: "api.staging.firebolt.io" | |
| LONG_TEST_VALUE: ${{ vars.LONG_TEST_VALUE_V1 }} | |
| run: | | |
| pytest --timeout_method "thread" -o log_cli=true -o log_cli_level=WARNING --junit-xml=report/junit.xml tests/integration -k "not V2 and not core" | |
| - name: Slack Notify of failure | |
| if: failure() | |
| id: slack | |
| uses: firebolt-db/action-slack-nightly-notify@v1 | |
| with: | |
| os: ${{ matrix.os }} | |
| programming-language: Python | |
| language-version: ${{ matrix.python-version }} | |
| notifications-channel: 'ecosystem-ci-notifications' | |
| slack-api-key: ${{ secrets.SLACK_BOT_TOKEN }} |