Skip to content

#526: Migrate AWS-backed CI workflow to GitHub Actions and refactor release workflow #982

#526: Migrate AWS-backed CI workflow to GitHub Actions and refactor release workflow

#526: Migrate AWS-backed CI workflow to GitHub Actions and refactor release workflow #982

Workflow file for this run

name: CI
on:
pull_request:
permissions:
id-token: write
contents: read
jobs:
run-unit-tests:
name: Unit Tests
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v8
with:
python-version: "3.10"
- name: Check Version Number
env:
RELEASE_MODE: workflow_dispatch
RELEASE_TITLE: CI validation
run: poetry run -- ai-lab release check
- name: Run Unit Tests
run: >
poetry run -- pytest
--capture=no
--override-ini=log_cli=true
--override-ini=log_cli_level=INFO
test/unit
approval-for-aws-ci-tests:
name: Run AWS CI Tests?
runs-on: ubuntu-24.04
needs: run-unit-tests
steps:
- name: Detect Running AWS CI Tests
run: true
environment:
approve-aws-ci-execution
run-aws-ci-tests:
name: AWS CI Tests
runs-on: ubuntu-24.04
needs: approval-for-aws-ci-tests
env:
DSS_RUN_CI_TEST: "true"
AWS_DEFAULT_REGION: ${{ vars.AWS_CI_REGION }}
AWS_USER_NAME: ci-user
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v8
with:
python-version: "3.10"
- uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ vars.AWS_CI_ROLE }}
role-session-name: github-actions-ai-lab-ci
aws-region: ${{ vars.AWS_CI_REGION }}
- name: Run AWS CI Tests
run: >
poetry run -- pytest
--capture=no
--override-ini=log_cli=true
--override-ini=log_cli_level=INFO
test/aws_ci/test_ci*.py
run-integration-tests:
name: Integration Tests
runs-on: ubuntu-24.04
needs: run-unit-tests
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: ./.github/actions/prepare_test_env/
- name: Run Integration Tests
run: >
poetry run -- pytest
--capture=no
--override-ini=log_cli=true
--override-ini=log_cli_level=INFO
test/integration
approval-for-notebook-tests:
name: Run Jupyter Notebook Tests?
runs-on: ubuntu-24.04
steps:
- name: Detect Running Notebook Tests
run: true
environment:
approve-test-execution
run-notebook-docker-image-builder:
uses: ./.github/workflows/notebook_docker_image_builder.yaml
needs: approval-for-notebook-tests
run-stable-notebook-tests:
uses: ./.github/workflows/notebook_tests.yaml
strategy:
fail-fast: false
matrix:
class: [ normal, large ]
secrets: inherit
with:
status-filter: stable
test-classification: ${{ matrix.class }}
needs: run-notebook-docker-image-builder
run-unstable-notebook-tests:
uses: ./.github/workflows/notebook_tests.yaml
strategy:
fail-fast: false
matrix:
class: [ normal ]
secrets: inherit
with:
status-filter: unstable
test-classification: ${{ matrix.class }}
needs: run-notebook-docker-image-builder
approval-for-gpu-notebook-tests:
name: Run Jupyter GPU Notebook Tests?
runs-on: ubuntu-24.04
steps:
- name: Detect Running GPU Notebook Tests
run: true
environment:
approve-gpu-test-execution
run-stable-gpu-notebook-tests:
uses: ./.github/workflows/notebook_tests.yaml
secrets: inherit
with:
status-filter: stable
test-classification: gpu
needs: [run-notebook-docker-image-builder, approval-for-gpu-notebook-tests]
gate-2:
if: ${{ !cancelled() }}
name: Gate 2 - Allow Merge
runs-on: ubuntu-24.04
needs: [ run-unit-tests, run-aws-ci-tests, run-integration-tests, run-stable-notebook-tests, run-stable-gpu-notebook-tests ]
steps:
- name: Branch Protection - failure if any ancestor failed
if: ${{ contains(needs.*.result, 'failure') }}
run: |
echo '${{ toJSON(needs) }}'
exit 1
- name: Branch Protection
run: true