-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (83 loc) · 3.49 KB
/
Copy pathnotebook_tests.yaml
File metadata and controls
96 lines (83 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Notebook Tests
on:
workflow_call:
inputs:
status-filter:
description: 'Only nb tests with the given status will be executed.'
required: true
type: string
test-classification:
description: 'normal, large or GPU'
type: string
required: true
jobs:
fetch-notebook-tests:
runs-on: ubuntu-24.04
name: Fetching tests
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
with:
python-version: "3.10"
- id: set-tests
run: |
TESTS=`poetry run -- nox -s get-notebook-tests -- --test-status ${{ inputs.status-filter }} --test-classification ${{ inputs.test-classification }}`
echo "tests=$TESTS" >> "$GITHUB_OUTPUT"
- id: set-runner
run: |
RUNNER=`poetry run -- nox -s get-runner -- --test-status ${{ inputs.status-filter }} --test-classification ${{ inputs.test-classification }}`
echo "runner=$RUNNER" >> "$GITHUB_OUTPUT"
- id: set-additional-pytest-parameters
run: |
ADD_PARAMS=`poetry run -- nox -s get-additional-pytest-parameter -- --test-status ${{ inputs.status-filter }} --test-classification ${{ inputs.test-classification }}`
echo "additional_pytest_parameters=$ADD_PARAMS" >> "$GITHUB_OUTPUT"
outputs:
tests: ${{ steps.set-tests.outputs.tests }}
runner: ${{ steps.set-runner.outputs.runner }}
additional-pytest-parameters: ${{ steps.set-additional-pytest-parameters.outputs.additional_pytest_parameters }}
notebook_tests-runner:
needs: [fetch-notebook-tests]
runs-on: ${{ needs.fetch-notebook-tests.outputs.runner }}
env:
DOCKER_TAG: "${{ github.sha }}"
DOCKER_IMG_ARTIFACT: "ai-lab-${{ github.sha }}"
DOCKER_IMG_FILENAME: "ai-lab-${{ github.sha }}.tar"
strategy:
fail-fast: false
matrix:
nb_test: "${{fromJson(needs.fetch-notebook-tests.outputs.tests).tests}}"
name: Running ${{ matrix.nb_test.name }} - ${{ matrix.nb_test.test_backend }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: ./.github/actions/prepare_test_env/
- name: Download AI Lab image
id: download-image
uses: actions/download-artifact@v5
with:
name: "${{ env.DOCKER_IMG_ARTIFACT }}"
path: "."
- name: Load AI Lab image
run: docker load -i "./$DOCKER_IMG_FILENAME"
- name: Run notebook tests
run: |
poetry run -- pytest \
--capture=no \
--override-ini=log_cli=true \
--override-ini=log_cli_level=INFO \
--dss-docker-image="exasol/ai-lab:$DOCKER_TAG" \
--nb-test-backend=${{ matrix.nb_test.test_backend }} \
--nb-test-file=${{ matrix.nb_test.test_file }} \
${{ needs.fetch-notebook-tests.outputs.additional-pytest-parameters }} \
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 }}
PROJECT_SHORT_TAG: XAIL-NB
TARGET_DOCKER_USERNAME: ${{ secrets.CI4_DOCKERHUB_USERNAME }}
TARGET_DOCKER_PASSWORD: ${{ secrets.CI4_DOCKERHUB_TOKEN }}