Skip to content

Commit

Permalink
♻️ [CI] Optimized adding entries to /etc/hosts for tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Codutti <[email protected]>
  • Loading branch information
Coduz committed Jan 23, 2025
1 parent 944202b commit ac36de5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .github/actions/runTestsTaggedAs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ runs:
run: mvn clean install -Pdocker -pl :kapua-assembly-api
shell: bash

- name: Dns look-up containers needed for tests - message-broker
if: ${{ inputs.needs-docker-images == 'true' }}
run: echo "127.0.0.1 message-broker" | sudo tee -a /etc/hosts
shell: bash

- name: Dns look-up containers needed for tests - job-engine
if: ${{ inputs.needs-docker-images == 'true' }}
run: echo "127.0.0.1 job-engine" | sudo tee -a /etc/hosts
shell: bash

- name: Cucumber tests execution step
if: ${{ inputs.run-junit == 'false' }}
run: mvn -B -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.filter.tags="${{ inputs.tag }}" -pl ${TEST_PROJECTS} verify
Expand Down
7 changes: 7 additions & 0 deletions .github/actions/setUpRunner/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: |
- Setup Java 11
- Setup Node 16
- Install Swagger CLI
- Add entries to /etc/hosts
runs:
using: "composite"
steps:
Expand All @@ -20,4 +21,10 @@ runs:

- name: Install Swagger CLI # Installs Swagger CLI to bundle OpenAPI files
run: 'npm install -g @apidevtools/swagger-cli'
shell: bash

- name: Dns look-up Docker containers needed for tests
run: |
echo "127.0.0.1 message-broker" | sudo tee -a /etc/hosts
echo "127.0.0.1 job-engine" | sudo tee -a /etc/hosts
shell: bash

0 comments on commit ac36de5

Please sign in to comment.