Skip to content

Commit

Permalink
add breakout between flaky and non-flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed May 20, 2024
1 parent 87c6bef commit 52358d1
Showing 1 changed file with 49 additions and 8 deletions.
57 changes: 49 additions & 8 deletions .github/workflows/release-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,16 @@ jobs:
name: 'Integration Tests'
runs-on: ubuntu-latest
needs: unit-tests

env:
TOXENV: integration-redshift
PYTEST_ADDOPTS: "-v --color=yes -n4 --csv integration_results.csv"
PYTEST_ADDOPTS: "-v --color=yes -n4"
DBT_INVOCATION_ENV: github-actions

steps:
- name: "Checkout provided ref, default to branch main"
uses: actions/checkout@v4
with:
ref: "${{ inputs.ref }}"

- name: "Setup Environment Variables - ./scripts/env-setup.sh"
run: source ./scripts/env-setup.sh

- name: "Set up Python - ${{ env.PYTHON_TARGET_VERSION }}"
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -164,12 +159,58 @@ jobs:
DBT_TEST_USER_1: dbt_test_user_1
DBT_TEST_USER_2: dbt_test_user_2
DBT_TEST_USER_3: dbt_test_user_3
run: tox -- -m "not flaky" --ddtrace
run: tox -- -m "not flaky"

integration-tests-flaky:
name: 'Integration Tests (flaky)'
runs-on: ubuntu-latest
needs: integration-tests

env:
TOXENV: integration-redshift
PYTEST_ADDOPTS: "-v --color=yes -n1"
DBT_INVOCATION_ENV: github-actions

steps:
- name: "Checkout provided ref, default to branch main"
uses: actions/checkout@v4
with:
ref: "${{ inputs.ref }}"

- name: "Set up Python - ${{ env.PYTHON_TARGET_VERSION }}"
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_TARGET_VERSION }}

- name: "Install Python Dependencies"
run: |
python -m pip install --user --upgrade pip
python -m pip --version
python -m pip install tox
tox --version
- name: "Run tox"
env:
REDSHIFT_TEST_DBNAME: ${{ secrets.REDSHIFT_TEST_DBNAME }}
REDSHIFT_TEST_PASS: ${{ secrets.REDSHIFT_TEST_PASS }}
REDSHIFT_TEST_USER: ${{ secrets.REDSHIFT_TEST_USER }}
REDSHIFT_TEST_PORT: ${{ secrets.REDSHIFT_TEST_PORT }}
REDSHIFT_TEST_HOST: ${{ secrets.REDSHIFT_TEST_HOST }}
REDSHIFT_TEST_REGION: ${{ vars.REDSHIFT_TEST_REGION }}
REDSHIFT_TEST_CLUSTER_ID: ${{ vars.REDSHIFT_TEST_CLUSTER_ID }}
REDSHIFT_TEST_IAM_USER_PROFILE: ${{ vars.REDSHIFT_TEST_IAM_USER_PROFILE }}
REDSHIFT_TEST_IAM_USER_ACCESS_KEY_ID: ${{ vars.REDSHIFT_TEST_IAM_USER_ACCESS_KEY_ID }}
REDSHIFT_TEST_IAM_USER_SECRET_ACCESS_KEY: ${{ secrets.REDSHIFT_TEST_IAM_USER_SECRET_ACCESS_KEY }}
REDSHIFT_TEST_IAM_ROLE_PROFILE: ${{ vars.REDSHIFT_TEST_IAM_ROLE_PROFILE }}
DBT_TEST_USER_1: dbt_test_user_1
DBT_TEST_USER_2: dbt_test_user_2
DBT_TEST_USER_3: dbt_test_user_3
run: tox -- -m flaky

create-internal-release:
name: Create release for internal archive
runs-on: ubuntu-latest
needs: integration-tests
needs: integration-tests-flaky

steps:
- name: "Checkout provided ref, default to branch main"
Expand Down

0 comments on commit 52358d1

Please sign in to comment.