-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #307 Made each notebook test a separate job * #307 Made each notebook test a separate job * #307 Made each notebook test a separate job * #307 Made each notebook test a separate job * #307 Made each notebook test a separate job * #307 Removed conftest.py * #307 Changed run syntax * #307 Restored conftest.py * #307 Restored conftest.py * #307 Added the rest of the notebook tests * [code build] * [CodeBuild] * [CodeBuild] * #307 Turned the notebook tests into a matrix * #307 [CodeBuild] * #307 Updated the changelog [CodeBuild]
- Loading branch information
Showing
6 changed files
with
99 additions
and
91 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 'Prepare Test Environment' | ||
description: 'A custom action performing common steps required for running tests' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Free disk space with jlumbroso | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
tool-cache: true | ||
large-packages: false | ||
|
||
- name: Free disk space by removing large directories | ||
run: | | ||
sudo rm -rf /usr/local/graalvm/ | ||
sudo rm -rf /usr/local/.ghcup/ | ||
sudo rm -rf /usr/local/share/powershell | ||
sudo rm -rf /usr/local/share/chromium | ||
sudo rm -rf /usr/local/lib/node_modules | ||
sudo rm -rf /opt/ghc | ||
shell: bash | ||
|
||
- name: Show available disk space | ||
run: df -h | ||
shell: bash | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.13.0 | ||
with: | ||
python-version: "3.10" | ||
poetry-version: "1.8.2" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Notebook Tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
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: | ||
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=${{ 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 }} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import pytest | ||
|
||
|
||
def pytest_addoption(parser): | ||
parser.addoption("--nb-test-file", action="store", help="Notebook test file nbtest_*.py") | ||
|
||
|
||
@pytest.fixture | ||
def notebook_test_file(request): | ||
return request.config.getoption("--nb-test-file") |
This file contains 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