diff --git a/.github/workflows/integration-tests-v1.yml b/.github/workflows/integration-tests-v1.yml index 01c62530905..bb4b737d0e3 100644 --- a/.github/workflows/integration-tests-v1.yml +++ b/.github/workflows/integration-tests-v1.yml @@ -1,34 +1,12 @@ name: Integration tests FB 1.0 on: workflow_dispatch: - inputs: - environment: - description: 'Environment to run the tests against' - type: choice - required: true - default: 'dev' - options: - - dev - - staging workflow_call: - inputs: - environment: - default: 'staging' - required: false - type: string secrets: - FIREBOLT_USERNAME: - required: true - FIREBOLT_PASSWORD: - required: true FIREBOLT_STG_USERNAME: required: true FIREBOLT_STG_PASSWORD: required: true - SERVICE_ID: - required: true - SERVICE_SECRET: - required: true SERVICE_ID_STG: required: true SERVICE_SECRET_STG: @@ -50,27 +28,13 @@ jobs: python -m pip install --upgrade pip pip install ".[dev]" - - name: Determine env variables - run: | - if [ "${{ inputs.environment }}" == 'staging' ]; then - echo "USERNAME=${{ secrets.FIREBOLT_STG_USERNAME }}" >> "$GITHUB_ENV" - echo "PASSWORD=${{ secrets.FIREBOLT_STG_PASSWORD }}" >> "$GITHUB_ENV" - echo "CLIENT_ID=${{ secrets.SERVICE_ID_STG }}" >> "$GITHUB_ENV" - echo "CLIENT_SECRET=${{ secrets.SERVICE_SECRET_STG }}" >> "$GITHUB_ENV" - else - echo "USERNAME=${{ secrets.FIREBOLT_USERNAME }}" >> "$GITHUB_ENV" - echo "PASSWORD=${{ secrets.FIREBOLT_PASSWORD }}" >> "$GITHUB_ENV" - echo "CLIENT_ID=${{ secrets.SERVICE_ID }}" >> "$GITHUB_ENV" - echo "CLIENT_SECRET=${{ secrets.SERVICE_SECRET }}" >> "$GITHUB_ENV" - fi - - name: Setup database and engine id: setup uses: firebolt-db/integration-testing-setup@v1 with: - firebolt-username: ${{ env.USERNAME }} - firebolt-password: ${{ env.PASSWORD }} - api-endpoint: "api.${{ inputs.environment }}.firebolt.io" + firebolt-username: ${{ secrets.FIREBOLT_STG_USERNAME }} + firebolt-password: ${{ secrets.FIREBOLT_STG_PASSWORD }} + api-endpoint: "api.staging.firebolt.io" region: "us-east-1" - name: Restore cached failed tests @@ -83,16 +47,16 @@ jobs: - name: Run integration tests env: - USER_NAME: ${{ env.USERNAME }} - PASSWORD: ${{ env.PASSWORD }} - SERVICE_ID: ${{ env.CLIENT_ID }} - SERVICE_SECRET: ${{ env.CLIENT_SECRET }} + 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 }} - API_ENDPOINT: "api.${{ inputs.environment }}.firebolt.io" + API_ENDPOINT: "api.staging.firebolt.io" ACCOUNT_NAME: "firebolt" run: | pytest --last-failed -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=INFO tests/integration -k "not V2" --runslow diff --git a/.github/workflows/integration-tests-v2.yml b/.github/workflows/integration-tests-v2.yml index 39b7dc940bc..0e3ab4211fb 100644 --- a/.github/workflows/integration-tests-v2.yml +++ b/.github/workflows/integration-tests-v2.yml @@ -1,30 +1,13 @@ name: Integration tests FB 2.0 on: workflow_dispatch: - inputs: - environment: - description: 'Environment to run the tests against' - type: choice - required: true - default: 'dev' - options: - - dev - - staging workflow_call: - inputs: - environment: - default: 'staging' - required: false - type: string secrets: FIREBOLT_CLIENT_ID_STG_NEW_IDN: required: true FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: required: true - FIREBOLT_CLIENT_ID_NEW_IDN: - required: true - FIREBOLT_CLIENT_SECRET_NEW_IDN: - required: true + jobs: tests: runs-on: ubuntu-latest @@ -42,33 +25,23 @@ jobs: python -m pip install --upgrade pip pip install ".[dev]" - - name: Determine env variables - run: | - if [ "${{ inputs.environment }}" == 'staging' ]; then - echo "CLIENT_ID=${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}" >> "$GITHUB_ENV" - echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}" >> "$GITHUB_ENV" - else - echo "CLIENT_ID=${{ secrets.FIREBOLT_CLIENT_ID_NEW_IDN }}" >> "$GITHUB_ENV" - echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET_NEW_IDN }}" >> "$GITHUB_ENV" - fi - - name: Setup database and engine id: setup uses: firebolt-db/integration-testing-setup@v2 with: - firebolt-client-id: ${{ env.CLIENT_ID }} - firebolt-client-secret: ${{ env.CLIENT_SECRET }} - account: "developer" - api-endpoint: "api.${{ inputs.environment }}.firebolt.io" + 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: Run integration tests env: - SERVICE_ID: ${{ env.CLIENT_ID }} - SERVICE_SECRET: ${{ env.CLIENT_SECRET }} + SERVICE_ID: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} + SERVICE_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 }} - API_ENDPOINT: "api.${{ inputs.environment }}.firebolt.io" - ACCOUNT_NAME: "developer" + API_ENDPOINT: "api.staging.firebolt.io" + ACCOUNT_NAME: ${{ vars.FIREBOLT_ACCOUNT }} run: | pytest -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=WARNING tests/integration -k "not V1" --runslow diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index d744acbdac1..5641cb377e2 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,34 +1,12 @@ name: Integration tests on: workflow_dispatch: - inputs: - environment: - description: 'Environment to run the tests against' - type: choice - required: true - default: 'dev' - options: - - dev - - staging workflow_call: - inputs: - environment: - default: 'staging' - required: false - type: string secrets: - FIREBOLT_USERNAME: - required: true - FIREBOLT_PASSWORD: - required: true FIREBOLT_STG_USERNAME: required: true FIREBOLT_STG_PASSWORD: required: true - SERVICE_ID: - required: true - SERVICE_SECRET: - required: true SERVICE_ID_STG: required: true SERVICE_SECRET_STG: @@ -38,30 +16,10 @@ on: required: true FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: required: true - FIREBOLT_CLIENT_ID_NEW_IDN: - required: true - FIREBOLT_CLIENT_SECRET_NEW_IDN: - required: true jobs: integration-test-v1: uses: ./.github/workflows/integration-tests-v1.yml - with: - environment: ${{ inputs.environment }} - secrets: - FIREBOLT_USERNAME: ${{ secrets.FIREBOLT_USERNAME }} - FIREBOLT_PASSWORD: ${{ secrets.FIREBOLT_PASSWORD }} - FIREBOLT_STG_USERNAME: ${{ secrets.FIREBOLT_STG_USERNAME }} - FIREBOLT_STG_PASSWORD: ${{ secrets.FIREBOLT_STG_PASSWORD }} - SERVICE_ID: ${{ secrets.SERVICE_ID }} - SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }} - SERVICE_ID_STG: ${{ secrets.SERVICE_ID_STG }} - SERVICE_SECRET_STG: ${{ secrets.SERVICE_SECRET_STG }} + secrets: inherit integration-test-v2: uses: ./.github/workflows/integration-tests-v2.yml - with: - environment: ${{ inputs.environment }} - secrets: - FIREBOLT_CLIENT_ID_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} - FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} - FIREBOLT_CLIENT_ID_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_ID_NEW_IDN }} - FIREBOLT_CLIENT_SECRET_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_SECRET_NEW_IDN }} + secrets: inherit diff --git a/.github/workflows/nightly-v2.yml b/.github/workflows/nightly-v2.yml index 7c7584daf82..7fb1eb0721b 100644 --- a/.github/workflows/nightly-v2.yml +++ b/.github/workflows/nightly-v2.yml @@ -49,7 +49,7 @@ jobs: firebolt-client-id: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} firebolt-client-secret: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} api-endpoint: "api.staging.firebolt.io" - account: "developer" + account: ${{ vars.FIREBOLT_ACCOUNT }} db_suffix: ${{ format('{0}_{1}', matrix.os, matrix.python-version) }} - name: Run integration tests @@ -59,7 +59,7 @@ jobs: DATABASE_NAME: ${{ steps.setup.outputs.database_name }} ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} - ACCOUNT_NAME: "developer" + ACCOUNT_NAME: ${{ vars.FIREBOLT_ACCOUNT }} API_ENDPOINT: "api.staging.firebolt.io" run: | pytest --timeout_method "thread" -o log_cli=true -o log_cli_level=WARNING --junit-xml=report/junit.xml tests/integration -k "not V1" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5178106fa99..46f197f14d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,21 +13,7 @@ on: jobs: integration-tests: uses: ./.github/workflows/integration-tests.yml - with: - environment: "staging" - secrets: - FIREBOLT_CLIENT_ID_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} - FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} - FIREBOLT_CLIENT_ID_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_ID_NEW_IDN }} - FIREBOLT_CLIENT_SECRET_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_SECRET_NEW_IDN }} - FIREBOLT_USERNAME: ${{ secrets.FIREBOLT_USERNAME }} - FIREBOLT_PASSWORD: ${{ secrets.FIREBOLT_PASSWORD }} - FIREBOLT_STG_USERNAME: ${{ secrets.FIREBOLT_STG_USERNAME }} - FIREBOLT_STG_PASSWORD: ${{ secrets.FIREBOLT_STG_PASSWORD }} - SERVICE_ID: ${{ secrets.SERVICE_ID }} - SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }} - SERVICE_ID_STG: ${{ secrets.SERVICE_ID_STG }} - SERVICE_SECRET_STG: ${{ secrets.SERVICE_SECRET_STG }} + secrets: inherit publish: runs-on: ubuntu-latest