Skip to content

Commit

Permalink
Create another action
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed May 24, 2024
1 parent 2cc129c commit c51eb49
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
22 changes: 22 additions & 0 deletions .github/actions/run-ee-server-and-setup-config-conf/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Run enterprise edition server and setup config.conf'
inputs:
running-tests-from-docker-container:
required: true
default: 'false'
description: 'If false, this assume you are running tests from the Docker host'

runs:
using: "composite"
steps:
- uses: ./.github/actions/run-ee-server
id: run-ee-server
with:
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}

- uses: ./.github/actions/setup-config-conf
with:
using-ee-server: 'true'
ee-host-ip-address: ${{ inputs.running-tests-from-docker-container == 'true' && steps.run-ee-server.outputs.server-docker-ip-address || '127.0.0.1' }}
23 changes: 2 additions & 21 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,28 +188,9 @@ jobs:
if: ${{ env.RUN_INTEGRATION_TESTS_IN_THIS_JOB == 'true' && matrix.platforms[0] == 'macosx_x86_64' }}
uses: ./.github/actions/setup-docker-on-macos

- uses: ./.github/actions/run-ee-server
id: run-ee-server
if: ${{ env.RUN_INTEGRATION_TESTS_IN_THIS_JOB == 'true' }}
with:
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}

- name: If running test in a manylinux Docker container, connect to internal Docker IP address of server container
if: ${{ env.RUN_INTEGRATION_TESTS_IN_THIS_JOB == 'true' && startsWith(matrix.platforms[0], 'manylinux') }}
run: echo "CONFIG_CONF_HOST_IP=${{ steps.run-ee-server.outputs.server-docker-ip-address }}" >> $GITHUB_ENV

- name: Otherwise if running tests from outside Docker container, use localhost
if: ${{ env.RUN_INTEGRATION_TESTS_IN_THIS_JOB == 'true' && !startsWith(matrix.platforms[0], 'manylinux') }}
run: echo "CONFIG_CONF_HOST_IP=127.0.0.1" >> $GITHUB_ENV

- uses: ./.github/actions/setup-config-conf
if: ${{ env.RUN_INTEGRATION_TESTS_IN_THIS_JOB == 'true' }}
- uses: ./.github/actions/run-ee-server-and-setup-config-conf
with:
using-ee-server: 'true'
ee-host-ip-address: ${{ env.CONFIG_CONF_HOST_IP }}
running-tests-from-docker-container: ${{ startsWith(matrix.platforms[0], 'manylinux') }}

- name: By default, disable tests (only run basic import test)
if: ${{ env.RUN_INTEGRATION_TESTS_IN_THIS_JOB == 'false' }}
Expand Down

0 comments on commit c51eb49

Please sign in to comment.