v2 Integration tests #18
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: v2 Integration tests | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| secrets: | |
| FIREBOLT_CLIENT_ID_STG_NEW_IDN: | |
| required: true | |
| FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: | |
| required: true | |
| inputs: | |
| engine-version: | |
| description: 'Engine version to use for integration tests' | |
| required: false | |
| type: string | |
| default: '' | |
| token: | |
| description: 'GitHub token if called from another workflow' | |
| required: false | |
| type: string | |
| jobs: | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: firebolt-db/firebolt-sqlalchemy | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.9 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install ".[dev]" | |
| - name: Setup database and engine | |
| id: setup | |
| uses: firebolt-db/integration-testing-setup@v2 | |
| with: | |
| firebolt-client-id: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} | |
| firebolt-client-secret: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} | |
| account: ${{ vars.FIREBOLT_ACCOUNT }} | |
| api-endpoint: "api.staging.firebolt.io" | |
| - name: Restore cached failed tests | |
| id: cache-tests-restore | |
| uses: actions/cache/restore@v3 | |
| with: | |
| path: | | |
| .pytest_cache/v/cache/lastfailed | |
| key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }}-v2 | |
| - name: Run integration tests | |
| env: | |
| CLIENT_ID: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} | |
| CLIENT_SECRET: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} | |
| DATABASE_NAME: ${{ steps.setup.outputs.database_name }} | |
| ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} | |
| STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} | |
| FIREBOLT_BASE_URL: "api.staging.firebolt.io" | |
| ACCOUNT_NAME: ${{ vars.FIREBOLT_ACCOUNT }} | |
| run: | | |
| pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration -k "not core" --alluredir=allure-results | |
| - name: Save failed tests | |
| id: cache-tests-save | |
| uses: actions/cache/save@v3 | |
| if: failure() | |
| with: | |
| path: | | |
| .pytest_cache/v/cache/lastfailed | |
| key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} | |
| # Need to pull the pages branch in order to fetch the previous runs | |
| - name: Get Allure history | |
| uses: actions/checkout@v4 | |
| if: always() | |
| continue-on-error: true | |
| with: | |
| ref: gh-pages | |
| path: gh-pages | |
| - name: Allure Report | |
| uses: firebolt-db/action-allure-report@v1 | |
| if: always() | |
| with: | |
| github-key: ${{ inputs.token || secrets.GITHUB_TOKEN }} | |
| test-type: integration | |
| allure-dir: allure-results | |
| pages-branch: gh-pages | |
| repository-name: firebolt-sqlalchemy |