Skip to content

Commit

Permalink
ci: Change the startup of the container
Browse files Browse the repository at this point in the history
  • Loading branch information
vaerh committed Dec 12, 2024
1 parent 8443848 commit 1cdc69c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/module_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ jobs:
- "7.16"

steps:
- name: Container check
run: |
echo "The container ID: ${{ job.services.routeros.id }}"
echo "Wait for the container to finish launching..."
while true; do
docker logs ${{ job.services.routeros.id }} 2>&1 | grep MikroTik && break
echo "waiting..."
sleep 10
done
IP=$(docker inspect ${{ job.services.routeros.id }} --format '{{.NetworkSettings.IPAddress}}')
echo "IP address: ${IP}"
echo "ROS_IP_ADDRESS=${IP}" >> "$GITHUB_ENV"
- name: Check out code into the Go module directory
uses: actions/checkout@v4

Expand All @@ -47,12 +60,11 @@ jobs:
env:
ROS_USERNAME: admin
ROS_PASSWORD: ''
ROS_IP_ADDRESS: 127.0.0.1

- name: Run client tests
run: go test -timeout 30m -v ./routeros
env:
ROS_HOSTURL: https://127.0.0.1
ROS_HOSTURL: https://${ROS_IP_ADDRESS}
ROS_USERNAME: admin
ROS_PASSWORD: ''
ROS_INSECURE: true
Expand Down

0 comments on commit 1cdc69c

Please sign in to comment.