Skip to content

Commit

Permalink
#427: Use GH merge-gate from TBX for slow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Nov 22, 2024
1 parent 9ed4dad commit 7400ccb
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 51 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ jobs:
metrics:
needs: [ ci-job ]
uses: ./.github/workflows/report.yml

publish-docker-runnmer:
uses: ./.github/workflows/publish_docker_runner.yml
5 changes: 1 addition & 4 deletions .github/workflows/publish_docker_runner.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Publish Docker Runner

on:
push:
branches:
- main
- 'ci-release-test/**'
workflow_call:

jobs:
publish:
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/shellcheck.yaml

This file was deleted.

23 changes: 2 additions & 21 deletions .github/workflows/test_db_versions_all_tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Test DB Versions with all tests

on:
push:
branches:
- main
pull_request:
workflow_call:

jobs:
get_exasol_versions:

uses: ./.github/workflows/get_exasol_versions.yml

test-db-versions-all-tests:
Expand All @@ -27,22 +25,5 @@ jobs:
python-version: "3.10"
poetry-version: '1.8.2'

- name: Fail, because not all tests are activated
run: |
git fetch
GIT_LOG="$(git log --pretty=oneline --abbrev-commit ${{ github.event.after }} | head -n 1)"
echo "$GIT_LOG"
if [[ "$GIT_LOG" == *"[run all tests]"* ]]; then
echo "All tests activated"
exit 0
else
echo "Fail, because not all tests are activated"
exit 1
fi
env:
EXASOL_VERSION: "${{ matrix.exasol_version }}"
# We want to deactivate running all tests only for pull_requests
if: ${{ github.event_name == 'pull_request' }}

- name: Run all tests
run: poetry run nox -s "run-tests(db_version='${{ matrix.exasol_version }}')"
5 changes: 1 addition & 4 deletions .github/workflows/test_db_versions_minimal.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Test DB Versions with minimal tests

on:
push:
branches:
- main
pull_request:
workflow_call:


jobs:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test_docker_starter.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Test Docker Starter

on:
push:
branches:
- main
pull_request:
workflow_call:

jobs:
test-docker-starter:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test_python_version.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Test Python Versions with all tests

on:
push:
branches:
- main
pull_request:
workflow_call:

jobs:
test-python-version-all-tests:
Expand All @@ -16,6 +13,8 @@ jobs:
python_version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
name: Run tests with Python ${{ matrix.python_version }} and Exasol ${{ matrix.exasol_version }}
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test_shell_scripts.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Test Shell Scripts

on: [push]
on:
workflow_call:

jobs:
build:
Expand All @@ -9,6 +10,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Run shellcheck
run: ./scripts/build/shellcheck.sh

- name: Install Test Dependencies
run: |
sudo apt-get install -y shunit2
Expand All @@ -19,3 +23,5 @@ jobs:
- name: Run Starter Script Tests
run: starter_scripts/test/test_scripts.sh



14 changes: 12 additions & 2 deletions .github/workflows/tests_with_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ jobs:
name: coverage-python${{ matrix.python-version }}
path: .coverage
include-hidden-files: true

Db-Version-Minimal-Tests:
uses: ./.github/workflows/test_db_versions_minimal.yml
Test-Docker-Starter:
uses: ./.github/workflows/test_docker_starter.yml
Test-Python-Version:
uses: ./.github/workflows/test_python_version.yml
Test-Shell-Scripts:
uses: ./.github/workflows/test_shell_scripts.yml
Slow-Tests:
name: Slow
runs-on: ubuntu-latest
Expand All @@ -55,4 +62,7 @@ jobs:
steps:
- name: Tests
run: |
echo "Slow tests ran successfully"
echo "Slow tests approved"
Test-Db-Versions-All-Tests:
needs: Slow-Tests
uses: ./.github/workflows/test_db_versions_all_tests.yml

0 comments on commit 7400ccb

Please sign in to comment.