Using Github Action without Docker #33
-
I tried using the action to test my collection. My integration tests fail. Here's the code: https://github.com/T-Systems-MMS/ansible-collection-icinga-director/blob/ansible_2.14/.github/workflows/main.yml#L71 Here's the failing job: https://github.com/T-Systems-MMS/ansible-collection-icinga-director/actions/runs/3096045473/jobs/5011132984 I'm running a service-container on port 80 that is used to test the collection. With the old code (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/blob/master/.github/workflows/main.yml) everything works. I'm guessing this is because the new action uses docker to run the tests and my former workflow runs the tests natively. Is there any way to achieve it without docker or am I complete wring here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Right now this action only allows running tests with docker (and this is definitely the cause for your problem). What you could try:
If you add a default EDIT: The action was updated to tell ansible-test about GitHub's docker network. With this, you are able to access the icinga container as |
Beta Was this translation helpful? Give feedback.
Right now this action only allows running tests with docker (and this is definitely the cause for your problem).
What you could try:
pre-test-cmd
to create atests/integration/integration_config.yml
file which contains the IP of the main container (or even directly the service container), so that the service can be reached as<ip_from_that_file>:80
.tests/integration/integration_config.yml
to talk to the service.If you add a default
tests/integration/integration_config.yml
file in your repo that sets the IP to 127.0.0.1 your tests should just continue working for folks who run them locally.EDIT: The action was updated to tell ansib…