Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjoyo committed Feb 2, 2024
1 parent dac790f commit b306928
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 20 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,36 @@ env:

jobs:
build-jvm:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ {name: ubuntu-latest, arch: amd64}, {name: macos-14, arch: arm64} ]
runs-on: ${{ matrix.os.name }}
defaults:
run:
working-directory: ./feel-engine-wrapper
steps:
- name: Checkout code
-
name: Checkout code
uses: actions/checkout@v3

# Get GPG private key into GPG
- name: Import GPG Owner Trust
run: echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --import-ownertrust

- name: Import GPG key
run: echo ${{ secrets.GPG_SECRET_KEYS }} | base64 --decode | gpg --import --no-tty --batch --yes

# Setup JDK and Maven
- uses: graalvm/setup-graalvm@v1
-
name: Setup GraalVM JDK 21
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'

- name: Prepare Maven Wrapper
-
name: Prepare Maven Wrapper
run: chmod +x ./mvnw

- name: Build with Maven
-
name: Build native executable with Maven
run: ./mvnw package -Dnative
-
name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: feel-engine-wrapper-${{ matrix.os.name }}-${{ matrix.os.arch }}
path: /target/*-runner
if-no-files-found: error

build-python:
runs-on: ubuntu-latest
Expand All @@ -62,9 +66,16 @@ jobs:
-
name: Build
run: poetry build
-
name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: bpm-ai-connectors-c8
path: dist/
if-no-files-found: error

build-push-amd64:
needs: [build-jvm, build-python]
#needs: [build-jvm, build-python]
runs-on: ubuntu-latest
steps:
-
Expand Down Expand Up @@ -101,7 +112,7 @@ jobs:
${{ env.REGISTRY_IMAGE }}:latest-amd64
build-push-arm64:
needs: [build-jvm, build-python]
#needs: [build-jvm, build-python]
runs-on: macos-14
steps:
-
Expand All @@ -111,7 +122,7 @@ jobs:
name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
run: |
brew install docker
brew install docker colima
colima start
# For testcontainers to find the Colima socket
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
Expand Down
7 changes: 6 additions & 1 deletion bpm-ai-connectors-c8/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from testcontainers.core.waiting_utils import wait_for_logs
from xprocess import ProcessStarter

logger = logging.getLogger("test")

# specifically use the amd64 tag as the docker image test runs after the platform images are pushed,
# but before the merged multiarch manifest (latest tag) is pushed.
# ideally both platform images should be tested (and even better before anything is pushed at all...)
Expand Down Expand Up @@ -46,7 +48,7 @@ class Starter(ProcessStarter):
yield
full_logs = Path(log_path).read_text().split("@@__xproc_block_delimiter__@@")
latest_logs = full_logs[-1] if full_logs else ""
logging.getLogger("test").info(latest_logs)
logger.info(latest_logs)
xprocess.getinfo("connector_runtime").terminate()


Expand All @@ -71,6 +73,9 @@ def docker_runtime(zeebe_test_engine):
container.start()
wait_for_logs(container, "Starting connector worker.")
yield container
stdout, stderr = container.get_logs()
logger.info(stdout)
logger.error(stderr)
container.stop()


Expand Down

0 comments on commit b306928

Please sign in to comment.