Skip to content

Test #515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open

Test #515

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
243440d
Test
tomuben Apr 1, 2025
4ea1075
Update name
tomuben Apr 1, 2025
c6150a3
Fixed build.yaml
tomuben Apr 1, 2025
f92bf6a
Fixed build.yaml
tomuben Apr 2, 2025
93a0753
Run build on different runners
tomuben Apr 2, 2025
3481943
Run build on different runners
tomuben Apr 2, 2025
98ee660
Added test skeleton
tomuben Apr 2, 2025
aea93c7
Renamed test job
tomuben Apr 2, 2025
b26e26f
Check space
tomuben Apr 2, 2025
142b5e4
Check space
tomuben Apr 2, 2025
4fec982
Check space
tomuben Apr 2, 2025
b75c0a0
Use only "template-Exasol-all-python-3.10"
tomuben Apr 3, 2025
48842ba
Restructured
tomuben Apr 3, 2025
e9ff4ff
Fixed ci_flavor.yaml
tomuben Apr 3, 2025
22f8b0a
Matrix build for tests
tomuben Apr 3, 2025
6451cae
Fixed ci.json files
tomuben Apr 3, 2025
f0e4763
Fixed test_slc.yaml
tomuben Apr 3, 2025
bd7a26b
Fixedyaml files
tomuben Apr 3, 2025
d5455ea
1. Added test-set for linker namespace tests
tomuben Apr 10, 2025
b8b6cdc
Fixed usage string
tomuben Apr 15, 2025
06e3353
Echo download directory
tomuben Apr 15, 2025
fa3ff85
Run tests
tomuben Apr 15, 2025
d2eb019
Fix Github workflows
tomuben Apr 15, 2025
66e6369
Fixed noxfile.py
tomuben Apr 15, 2025
41973f2
Fixed test_slc.yaml
tomuben Apr 16, 2025
1e9a559
Fixed noxfile.py
tomuben Apr 16, 2025
33a6534
Fixed noxfile.py
tomuben Apr 16, 2025
0e77559
Fixed noxfile.py
tomuben Apr 16, 2025
7a15c7c
Fixed noxfile.py
tomuben Apr 16, 2025
b87f174
Removed debug output in noxfile.py
tomuben Apr 16, 2025
bd4fc9a
Use slc ci first draft
tomuben Apr 23, 2025
319bb2b
Moved workflow files
tomuben Apr 24, 2025
d8a3ef6
Pass secrets explicitely
tomuben Apr 24, 2025
d62f436
Pass secrets
tomuben Apr 24, 2025
80e2229
Debugging
tomuben Apr 24, 2025
04a4a9f
Debugging
tomuben Apr 24, 2025
bfb5137
Debugging
tomuben Apr 24, 2025
25a9ba1
Debugging
tomuben Apr 24, 2025
fd0cc03
Debugging
tomuben Apr 24, 2025
c33a8e1
Debugging
tomuben Apr 24, 2025
4743736
Debugging
tomuben Apr 24, 2025
4dabd8a
Debugging
tomuben Apr 24, 2025
694d417
Debugging
tomuben Apr 24, 2025
6cd3c8a
Debugging
tomuben Apr 24, 2025
a9367a0
Debugging
tomuben Apr 24, 2025
cda445b
Debugging
tomuben Apr 24, 2025
ba95a52
Debugging
tomuben Apr 24, 2025
a94ef70
Test
tomuben Apr 24, 2025
c6537f1
Updated lock
tomuben Apr 24, 2025
3bb04ae
Added newline
tomuben Apr 24, 2025
88cc40e
Fix bugs
tomuben Apr 24, 2025
ad0393c
Update lock file
tomuben Apr 24, 2025
0b184b7
Use latest slc-ci
tomuben Apr 25, 2025
db9d05a
Fixes
tomuben Apr 25, 2025
ff42737
Fixes
tomuben Apr 25, 2025
cd27ad2
Update slc-ci
tomuben Apr 25, 2025
88854ce
Update slc-ci
tomuben Apr 25, 2025
38eae65
Update slc-ci
tomuben Apr 25, 2025
6b4c7e4
Downgraded itde
tomuben Apr 25, 2025
b49e751
Updated slc-ci
tomuben Apr 28, 2025
de3352b
Upload logs
tomuben Apr 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
get-flavors:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: '3.10'
poetry-version: '2.1.2'
- id: set-matrix
run: |
poetry -- run nox -s ci:find-available-flavors -- --github-var matrix
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

ci:
needs: get-flavors
strategy:
fail-fast: true
matrix:
flavor: ${{fromJson(needs.get-flavors.outputs.matrix)}}
uses: ./.github/workflows/ci_flavor.yaml
secrets: inherit
with:
flavor: ${{ matrix.flavor }}


71 changes: 71 additions & 0 deletions .github/workflows/ci_build_slc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build SLC

on:
workflow_call:
inputs:
flavor:
description: 'A flavor'
required: true
type: string
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true

jobs:

detect-runner:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: '3.10'
poetry-version: '2.1.2'
- name: Detect runner
id: detect-runner
run: |
poetry run -- nox -s "ci:get-build-runner-for-flavor" -- --flavor "${{ inputs.flavor }}" --github-var runner
outputs:
runner: ${{ steps.detect-runner.outputs.runner }}
build:
needs: detect-runner
runs-on:
labels: ${{needs.detect-runner.outputs.runner}}
steps:
- uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: '3.10'
poetry-version: '2.1.2'

- name: Build SLC ${{ inputs.flavor }}
id: build-slc
run: |
branch_name="${{github.head_ref || github.ref_name}}"
poetry run -- nox -s "ci:export-and-scan-vulnerabilities" -- --flavor "${{inputs.flavor}}" --branch-name ${{github.ref_name}} --docker-user "$DOCKER_USERNAME" --docker-password "$DOCKER_PASSWORD" --commit-sha "${{ github.sha }}" --github-var slc_path
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

- uses: actions/upload-artifact@v4
id: artifact-upload-logs-step
with:
name: logs_${{inputs.flavor}}
path: |
.build_output/jobs/**/*
.build_output/security_scan/**/*
.build_output/metadata/**/*
retention-days: 30

- uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: slc_${{inputs.flavor}}
path: "${{ steps.build-slc.outputs.slc_path }}"
compression-level: 0
retention-days: 7
34 changes: 34 additions & 0 deletions .github/workflows/ci_check_for_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
workflow_call:
inputs:
flavor:
description: 'A flavor'
required: true
type: string
outputs:
continue:
description: "Indicates if need to build and test SLC"
value: ${{ jobs.check_for_build.outputs.continue }}

jobs:
check_for_build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: "3.10"
poetry-version: "2.1.2"
- name: Run check
id: run-check
run: |
branch_name="${{github.head_ref || github.ref_name}}"
poetry run -- nox -s ci:check-if-build-need -- --flavor ${{ inputs.flavor }} --branch-name "$branch_name" --github-var continue

outputs:
continue: ${{ steps.run-check.outputs.continue }}
43 changes: 43 additions & 0 deletions .github/workflows/ci_flavor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
workflow_call:
inputs:
flavor:
description: 'A flavor'
required: true
type: string
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true

jobs:
check_for_build:
uses: ./.github/workflows/ci_check_for_build.yaml
with:
flavor: ${{ inputs.flavor }}

do_nothing:
if: ${{ needs.check_for_build.outputs.continue != 'True' }}
needs: [check_for_build]
runs-on: ubuntu-24.04
steps:
- name: Print status
run: Skipping build and test for flavor ${{ inputs.flavor }}

build:
needs: check_for_build
uses: ./.github/workflows/ci_build_slc.yaml
if: ${{ needs.check_for_build.outputs.continue == 'True' }}
with:
flavor: ${{ inputs.flavor }}
secrets: inherit
test:
needs: [check_for_build, build]
if: ${{ needs.check_for_build.outputs.continue == 'True' }}
uses: ./.github/workflows/ci_test_slc.yaml
with:
flavor: ${{ inputs.flavor }}
secrets: inherit
75 changes: 75 additions & 0 deletions .github/workflows/ci_test_slc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Test SLC

on:
workflow_call:
inputs:
flavor:
description: 'A flavor'
required: true
type: string
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
jobs:

detect-test-runner:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: '3.10'
poetry-version: '2.1.2'
- name: Detect Test runner
id: detect-test-runner
run: |
poetry run -- nox -s ci:get-test-runner-for-flavor -- --flavor "${{ inputs.flavor }}" --github-var runner
outputs:
runner: ${{ steps.detect-test-runner.outputs.runner }}

detect-test-sets:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: '3.10'
poetry-version: '2.1.2'
- name: Detect Test runner
id: detect-test-sets
run: |
poetry run -- nox -s ci:get-test-set-names-for-flavor -- --flavor "${{ inputs.flavor }}" --github-var test_set_names
outputs:
test-sets: ${{ steps.detect-test-sets.outputs.test_set_names }}

run-tests:
needs: [detect-test-runner, detect-test-sets]
runs-on:
labels: ${{needs.detect-test-runner.outputs.runner}}
strategy:
fail-fast: true
matrix:
test-set: ${{fromJson(needs.detect-test-sets.outputs.test-sets)}}
steps:
- uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: '3.10'
poetry-version: '2.1.2'
- name: Download SLC
id: download-slc
uses: actions/download-artifact@v4
with:
name: slc_${{inputs.flavor}}
path: "slc"
- name: Run Test-Set ${{ matrix.test-set }}
run: |
poetry run -- nox -s ci:run-db-tests -- --flavor "${{ inputs.flavor }}" --docker-user "$DOCKER_USERNAME" --docker-password "$DOCKER_PASSWORD" --test-set-name ${{ matrix.test-set }} --slc-directory "${{ steps.download-slc.outputs.download-path }}"
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Empty file.
16 changes: 16 additions & 0 deletions flavors/template-Exasol-8-python-3.10-cuda-conda/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"build_runner": "int-linux-x64-4core-ubuntu24.04-1",
"test_config": {
"test_runner": "int-linux-x64-4core-ubuntu24.04-1",
"test_sets": [
{
"name": "all",
"folders": ["python3/all"]
},
{
"name": "pandas",
"folders": ["pandas/all", "pandas/pandas2"]
}
]
}
}
16 changes: 16 additions & 0 deletions flavors/template-Exasol-all-python-3.10-conda/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"build_runner": "ubuntu-22.04",
"test_config": {
"test_runner": "ubuntu-22.04",
"test_sets": [
{
"name": "all",
"folders": ["python3/all"]
},
{
"name": "pandas",
"folders": ["pandas/all", "pandas/pandas2"]
}
]
}
}
20 changes: 20 additions & 0 deletions flavors/template-Exasol-all-python-3.10/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"build_runner": "ubuntu-22.04",
"test_config": {
"test_runner": "ubuntu-22.04",
"test_sets": [
{
"name": "all",
"folders": ["python3/all"]
},
{
"name": "pandas",
"folders": ["pandas/all", "pandas/pandas2"]
},
{
"name": "linker_namespace",
"folders": ["pandas/all", "pandas/pandas2"]
}
]
}
}
20 changes: 20 additions & 0 deletions flavors/test-Exasol-8-cuda-ml/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"build_runner": "int-linux-x64-4core-ubuntu24.04-1",
"test_config": {
"test_runner": "int-linux-x64-4core-ubuntu24.04-1",
"test_sets": [
{
"name": "all",
"folders": ["python3/all"]
},
{
"name": "pandas",
"folders": ["pandas/all", "pandas/pandas2"]
},
{
"name": "cuda",
"folders": ["python3-cuda-flavor"]
}
]
}
}
12 changes: 9 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import argparse
import json
from argparse import ArgumentParser
from pathlib import Path

from typing import List

import nox
from exasol.slc.api import run_db_tests as exaslct_run_db_tests

ROOT = Path(__file__).parent
from exasol.slc_ci.nox.tasks import *

ROOT = Path(__file__).parent
FLAVOR_PATH = ROOT / "flavors"

# default actions to be run if nothing is explicitly specified with the -s option
nox.options.sessions = []


def get_oft_jar(session: nox.Session) -> Path:
oft_version = "4.1.0"
oft_jar = Path.home() / ".m2" / "repository" / "org" / "itsallcode" / "openfasttrace" / "openfasttrace" / oft_version / f"openfasttrace-{oft_version}.jar"
Expand Down Expand Up @@ -54,3 +59,4 @@ def run_oft_udf_client_html(session: nox.Session):
"""
html_file = session.posargs[0] if session.posargs else "report.html"
run_oft_for_udf_client(session, "-o", "html", "-f", html_file)

Loading
Loading