test: add test for networking setup in act (#1375)

* test: add test for networking setup in act

This test makes sure that the hostname inside of act is resolvable.

* fix: only merge existing container options

When merging parsed container options without options being
set in a job, the default docker options are returned and
will override the expected defaults by act (e.g. network mode).

This is a first attempt to mitigate this behavior and only
merge settings if something was requested on a job.

* refactor: split config merging into own function

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Markus Wolf
2022-10-12 18:30:56 +02:00
committed by GitHub
parent f0b1845802
commit ff5e289804
3 changed files with 63 additions and 30 deletions

14
pkg/runner/testdata/networking/push.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: test network setup
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install tools
run: |
apt update
apt install -y bind9-host
- name: Run hostname test
run: |
hostname -f
host $(hostname -f)