Skip to content

Commit

Permalink
Moved up broker create to stabilize before test
Browse files Browse the repository at this point in the history
  • Loading branch information
bczoma committed Jul 24, 2024
1 parent c66b0d9 commit d241c74
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/broker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,34 +62,37 @@ jobs:
echo "No changes detected, skipping further steps"
- name: List changed files - from now on all tests are run only if there were changes
# if: steps.check-changed-files.outputs.files_changed == 'true'
if: steps.check-changed-files.outputs.files_changed == 'true'
run: |
echo "Changed files: ${{ steps.check-changed-files.outputs.changed_files }}"
git diff
- name: Set up Terraform latest
# if: steps.check-changed-files.outputs.files_changed == 'true'
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false

- name: Setup Test broker
# if: steps.check-changed-files.outputs.files_changed == 'true'
if: steps.check-changed-files.outputs.files_changed == 'true'
run: |
mkdir -p $HOME/solace; chmod 777 $HOME/solace
docker run -d -p 8080:8080 -p 55555:55555 --shm-size=1g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --env system_scaling_maxkafkabridgecount="10" --name=solace \
--env system_scaling_maxconnectioncount="1000" --mount type=bind,source=$HOME/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard:latest
while ! curl -s localhost:8080 | grep aurelia ; do sleep 1 ; done
- name: Set up Terraform latest
if: steps.check-changed-files.outputs.files_changed == 'true'
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false

- name: Test module from template on test broker
if: steps.check-changed-files.outputs.files_changed == 'true'
run: |
ci/scripts/test-module.sh ci/template-test
- name: Test module root on test broker
if: steps.check-changed-files.outputs.files_changed == 'true'
run: |
ci/scripts/test-module.sh ci/module-test
- name: Test examples
if: steps.check-changed-files.outputs.files_changed == 'true'
run: |
shopt -s extglob
for d in examples/!(basic-client-username)/; do (ci/scripts/test-module.sh "$d"); done
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/module-test-pipeline-main-branch-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Terraform latest - with token
uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
terraform_wrapper: true

- name: Setup test broker
run: |
mkdir -p $HOME/solace; chmod 777 $HOME/solace
docker run -d -p 8080:8080 -p 55555:55555 --shm-size=1g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --env system_scaling_maxkafkabridgecount="10" --name=solace \
--env system_scaling_maxconnectioncount="1000" --mount type=bind,source=$HOME/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard:latest
while ! curl -s localhost:8080 | grep aurelia ; do sleep 1 ; done
- name: Set up Terraform latest - with token
uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
terraform_wrapper: true

- name: Test module root on test broker
run: |
ci/scripts/test-module.sh ci/module-test
Expand Down

0 comments on commit d241c74

Please sign in to comment.