@@ -141,6 +141,15 @@ jobs:
141141 - name : Adjust git config to allow running git-related tests
142142 run : git config --global safe.directory '*'
143143
144+ - name : Generate test SSH key pair used for deployment tests
145+ run : |
146+ mkdir -p "$HOME/.ssh"
147+ ssh-keygen -t rsa -b 4096 -m PEM -N '' -f "$HOME/.ssh/id_rsa"
148+ chmod 600 "$HOME/.ssh/id_rsa"
149+ ssh-agent -a "${HOME}/ssh-agent.sock" > ssh-agent-output
150+ export SSH_AUTH_SOCK=$(grep SSH_AUTH_SOCK ssh-agent-output | cut -d';' -f1 | cut -d= -f2)
151+ echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" >> "$GITHUB_ENV"
152+
144153 - name : Setup Node.js
145154 uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
146155 with :
@@ -161,7 +170,15 @@ jobs:
161170 run : |
162171 # Create an empty coverage directory to avoid errors. @see https://github.com/actions/upload-artifact/issues/255
163172 mkdir -p /tmp/.vortex-coverage-html && touch "/tmp/.vortex-coverage-html/.empty-$(date +%Y%m%d%H%M%S)"
164- php -d memory_limit=-1 vendor/bin/phpunit phpunit --group="${TEST_NODE_INDEX:-*}"
173+
174+ # Configure git username and email if it is not set.
175+ [ "$(git config --global user.name)" = "" ] && echo "==> Configuring global test git user name" && git config --global user.name "Test user"
176+ [ "$(git config --global user.email)" = "" ] && echo "==> Configuring global test git user email" && git config --global user.email "someone@example.com"
177+
178+ # Create stub of local network.
179+ docker network create amazeeio-network 2>/dev/null || true
180+
181+ php -d memory_limit=-1 vendor/bin/phpunit --group="p${TEST_NODE_INDEX:-*}"
165182 working-directory : .vortex/tests
166183 env :
167184 TEST_VORTEX_DEBUG : ${{ vars.TEST_VORTEX_DEBUG }}
0 commit comments