Skip to content

Commit

Permalink
Pipeline improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
DomPeliniAerospike committed Nov 20, 2024
1 parent fe74d74 commit f181bb1
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 11 deletions.
37 changes: 37 additions & 0 deletions .github/actions/run-ee-server-for-ext-container/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Run EE server for another Docker container'
description: 'Run EE server and configure tests to connect to it from another Docker container'
inputs:
# All inputs in composite actions are strings
use-server-rc:
required: true
default: false
server-tag:
required: true
default: 'latest'
# Github Composite Actions can't access secrets
# so we need to pass them in as inputs
docker-hub-username:
required: false
docker-hub-password:
required: false

runs:
using: "composite"
steps:
- name: Run EE server
uses: ./.github/actions/run-ee-server
with:
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}
docker-hub-username: ${{ inputs.docker-hub-username }}
docker-hub-password: ${{ inputs.docker-hub-password }}

- name: Get IP address of Docker container hosting server
id: get-server-ip-address
run: echo server-ip=$(docker container inspect -f '{{ .NetworkSettings.IPAddress }}' aerospike) >> $GITHUB_OUTPUT
shell: bash

- name: Configure tests to connect to that Docker container
run: crudini --existing=param --set config.conf enterprise-edition hosts ${{ steps.get-server-ip-address.outputs.server-ip }}:3000
working-directory: test
shell: bash
31 changes: 20 additions & 11 deletions .github/workflows/build-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ on:
required: true
options:
- manylinux_x86_64
- manylinux_aarch64
#- manylinux_aarch64
- macosx_x86_64
- macosx_arm64
- win_amd64
#- macosx_arm64
#- win_amd64
# Makes debugging via gh cli easier.
default: manylinux_x86_64
unoptimized:
Expand Down Expand Up @@ -212,14 +212,14 @@ jobs:
# run: echo "TEST_COMMAND=python -c \"import aerospike\"" >> $GITHUB_ENV
# shell: bash

- name: Otherwise, enable integration tests
if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'true' }}
run: echo "TEST_COMMAND=cd ts-test;
npm install typescript --save-dev;
npx tsc;
cd ..;
npm run test dist/ -- --h 127.0.0.1 --port 3000" >> $GITHUB_ENV
shell: bash
#- name: Otherwise, enable integration tests
# if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'true' }}
# run: echo "TEST_COMMAND=cd ts-test;
# npm install typescript --save-dev;
# npx tsc;
# cd ..;
# npm run test dist/ -- --h 127.0.0.1 --port 3000" >> $GITHUB_ENV
# shell: bash

- name: Set unoptimize flag
if: ${{ inputs.unoptimized && (startsWith(inputs.platform-tag, 'manylinux') || startsWith(inputs.platform-tag, 'macosx')) }}
Expand All @@ -234,6 +234,15 @@ jobs:
./scripts/build-c-client.sh;
npm install;
- name: Run tests
if: ${{ inputs.run_tests}}
run: |
cd ts-test;
npm install typescript --save-dev;
npx tsc;
cd ..;
npm run test dist/ -- --h 127.0.0.1 --port 3000;
# NEED TO MAKE A NODEJS ACTION WHICH REPLACES THIS!!!
#- name: Build wheel
# uses: pypa/[email protected]
Expand Down

0 comments on commit f181bb1

Please sign in to comment.