Skip to content

Commit

Permalink
#307 Turned the notebook tests into a matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsimb committed Jul 30, 2024
1 parent a563e07 commit 1bc83e4
Showing 1 changed file with 14 additions and 79 deletions.
93 changes: 14 additions & 79 deletions .github/workflows/notebook_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,86 +4,18 @@ on:
workflow_call:

jobs:
sklearn:
name: Running nbtest_sklearn.py
notebook_tests:
environment: AWS_SAGEMAKER
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: ./.github/actions/prepare_test_env/

- name: Run notebook tests
run: |
poetry run pytest \
--capture=no \
--override-ini=log_cli=true \
--override-ini=log_cli_level=INFO \
--nb-test-file=nbtest_sklearn.py \
test/notebook_test_runner/test_notebooks_in_dss_docker_image.py
env:
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}

ibis:
name: Running nbtest_ibis.py
environment: AWS_SAGEMAKER
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: ./.github/actions/prepare_test_env/

- name: Run notebook tests
run: |
poetry run pytest \
--capture=no \
--override-ini=log_cli=true \
--override-ini=log_cli_level=INFO \
--nb-test-file=nbtest_ibis.py \
test/notebook_test_runner/test_notebooks_in_dss_docker_image.py
env:
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}

slc:
name: Running nbtest_script_languages_container.py
environment: AWS_SAGEMAKER
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: ./.github/actions/prepare_test_env/

- name: Run notebook tests
run: |
poetry run pytest \
--capture=no \
--override-ini=log_cli=true \
--override-ini=log_cli_level=INFO \
--nb-test-file=nbtest_script_languages_container.py \
test/notebook_test_runner/test_notebooks_in_dss_docker_image.py
env:
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}

misc:
name: Running relatively short notebook tests
environment: AWS_SAGEMAKER
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
nb_test:
- { name: "sklearn notebook", test_file: "nbtest_sklearn.py" }
- { name: "ibis notebook", test_file: "nbtest_ibis.py" }
- { name: "SLC notebook", test_file: "nbtest_script_languages_container.py" }
- { name: "short notebook tests", test_file: "nbtest_environment_test.py nbtest_itde.py"}
name: Running ${{ matrix.nb_test.name }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -97,9 +29,12 @@ jobs:
--capture=no \
--override-ini=log_cli=true \
--override-ini=log_cli_level=INFO \
--nb-test-file="nbtest_environment_test.py nbtest_itde.py" \
--nb-test-file=${{ matrix.nb_test.test_file }} \
test/notebook_test_runner/test_notebooks_in_dss_docker_image.py
env:
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}
NBTEST_AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
NBTEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
NBTEST_AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}

0 comments on commit 1bc83e4

Please sign in to comment.