Skip to content

ci: Try run tests in parallel #2

ci: Try run tests in parallel

ci: Try run tests in parallel #2

name: Selenoid Runners
on:
pull_request:
push:
branches:
- main
workflow_call:
workflow_dispatch:
env:
GK_FQDN: 192.168.128.178
jobs:
firefox-runners:
runs-on: ubuntu-latest
strategy:
matrix:
SELENOID_RUNNER_ID: [1,2]
env:
SELENOID_RUNNER_ID: ${{ matrix.SELENOID_RUNNER_ID }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup variables
shell: bash
run: |
((d = 178 + ${{ matrix.SELENOID_RUNNER_ID }}))
echo "RUNNER_IP=192.168.128.${d}" >> "$GITHUB_ENV"
- name: Set up WireGuard
uses: egor-tensin/setup-wireguard@v1
with:
endpoint: '${{ secrets.WG_SERVER_ENDPOINT }}'
endpoint_public_key: '${{ secrets.WG_SERVER_PUBLIC_KEY }}'
ips: '${{ env.RUNNER_IP }}/29'
allowed_ips: '192.168.128.176/29'
private_key: '${{ secrets.WG_RUNNER_2_PRIVATE_KEY }}'
- name: Ping
shell: bash
run: |
ping -c1 192.168.128.177
ping -c1 ${RUNNER_IP}
ping -c5 -W1 ${GK_FQDN} || true
- name: Start selenoid
uses: ./.github/actions/start-selenoid/
- name: Keep runner running
shell: bash
run: |
while ping -c1 -W1 ${GK_FQDN} > /dev/null; do
sleep 10
done
echo "master runner exited"