Skip to content

Commit

Permalink
[CLIENT-2300] Run manylinux tests with EE server for Linux (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Aug 11, 2023
1 parent 5e898ff commit 9d224ba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
7 changes: 5 additions & 2 deletions .github/actions/run-ee-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
use-server-rc:
required: true
default: false
server-tag:
required: true
default: false

runs:
using: "composite"
Expand All @@ -26,12 +29,12 @@ runs:

- name: Use release server
if: ${{ inputs.use-server-rc == 'false' }}
run: echo "SERVER_IMAGE=aerospike/aerospike-server-enterprise" >> $GITHUB_ENV
run: echo "SERVER_IMAGE=aerospike/aerospike-server-enterprise:${{ inputs.server-tag }}" >> $GITHUB_ENV
shell: bash

- name: Use release candidate server
if: ${{ inputs.use-server-rc == 'true' }}
run: echo "SERVER_IMAGE=aerospike.jfrog.io/docker/aerospike/aerospike-server-enterprise-rc" >> $GITHUB_ENV
run: echo "SERVER_IMAGE=aerospike.jfrog.io/docker/aerospike/aerospike-server-enterprise-rc:${{ inputs.server-tag }}" >> $GITHUB_ENV
shell: bash

- name: Get default aerospike.conf from Docker server EE container
Expand Down
28 changes: 12 additions & 16 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,18 @@ jobs:
with:
platforms: all

- name: Run Aerospike server release candidate
if: ${{ inputs.use-server-rc }}
run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike.jfrog.io/docker/aerospike/aerospike-server-rc:${{ inputs.server-tag }}

- name: Set up Aerospike server
if: ${{ !inputs.use-server-rc }}
run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server:${{ inputs.server-tag }}
- uses: ./.github/actions/run-ee-server
with:
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}

- name: Set config.conf to use Docker IP address of Aerospike server
# config.conf should be copied into the cibuildwheel Docker container
run: |
export SERVER_DOCKER_IP=$(docker container inspect -f '{{ .NetworkSettings.IPAddress }}' aerospike)
pip install crudini
crudini --set config.conf community-edition hosts ${SERVER_DOCKER_IP}:3000
sed -i "s/127.0.0.1:3000//" config.conf
crudini --set config.conf enterprise-edition hosts ${SERVER_DOCKER_IP}:3000
working-directory: test

- name: Build wheel
Expand Down Expand Up @@ -126,13 +124,10 @@ jobs:
with:
submodules: recursive

- name: Run Aerospike server release candidate
if: ${{ inputs.use-server-rc }}
run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike.jfrog.io/docker/aerospike/aerospike-server-rc:${{ inputs.server-tag }}

- name: Set up Aerospike server
if: ${{ !inputs.use-server-rc }}
run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server:${{ inputs.server-tag }}
- uses: ./.github/actions/run-ee-server
with:
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}

- name: Wait for server to start
run: sleep 5
Expand All @@ -142,7 +137,8 @@ jobs:
run: |
export SERVER_DOCKER_IP=$(docker container inspect -f '{{ .NetworkSettings.IPAddress }}' aerospike)
pip install crudini
crudini --set config.conf community-edition hosts ${SERVER_DOCKER_IP}:3000
sed -i "s/127.0.0.1:3000//" config.conf
crudini --set config.conf enterprise-edition hosts ${SERVER_DOCKER_IP}:3000
working-directory: test

- name: Build wheel
Expand Down

0 comments on commit 9d224ba

Please sign in to comment.