diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 4ba2b147e..2bab5d9ed 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -8,29 +8,39 @@ jobs: freebsd: runs-on: macos-12 name: FreeBSD + timeout-minutes: 5 if: ${{ contains(github.event.pull_request.labels.*.name, 'tests:full') || contains(github.event.pull_request.labels.*.name, 'tests:long') || contains(github.event.pull_request.labels.*.name, 'tests:freebsd') }} steps: - uses: actions/checkout@v4 with: persist-credentials: false - name: Functional tests under FreeBSD - uses: vmactions/freebsd-vm@v0 + uses: cross-platform-actions/action@master with: - usesh: true - sync: sshfs + operating_system: freebsd + version: '13.2' + shell: bash + sync_files: runner-to-vm run: | - set -ex + source lib/shell/functions.inc + set -exu freebsd-version - mount -o acls / - pkg install -y bash rsync ca_root_nss jq fping screen flock curl - mkdir -p /opt/bastion - rsync -a . /opt/bastion/ - /opt/bastion/bin/admin/packages-check.sh -i - /opt/bastion/bin/admin/install-ttyrec.sh -s - /opt/bastion/bin/admin/install-yubico-piv-checker.sh -s - /opt/bastion/bin/admin/install-mkhash-helper.sh -s - /opt/bastion/bin/admin/install --new-install - ssh-keygen -t ed25519 -f id_user - ssh-keygen -t ed25519 -f id_root - WANT_HTTP_PROXY=0 NO_SLEEP=1 user_pubkey=$(cat id_user.pub) root_pubkey=$(cat id_root.pub) TARGET_USER=user5000 /opt/bastion/tests/functional/docker/target_role.sh - /opt/bastion/tests/functional/launch_tests_on_instance.sh --has-mfa=0 --has-mfa-password=1 --has-pamtester=1 --skip-consistency-check --remote-etc-bastion=/usr/local/etc/bastion 127.0.0.1 22 0 user5000 id_user id_root + id + sudo mount -o acls / + sudo pkg update + sudo pkg install -y bash rsync ca_root_nss jq fping screen flock curl + sudo mkdir -p /opt/bastion /opt/bastion/etc_ssh_backup + sudo rsync -a . /opt/bastion/ + sudo rsync -a $SSH_DIR/ /opt/bastion/etc_ssh_backup/ + sudo /opt/bastion/bin/admin/packages-check.sh -i + sudo /opt/bastion/bin/admin/install-ttyrec.sh -s + sudo /opt/bastion/bin/admin/install-yubico-piv-checker.sh -s + sudo /opt/bastion/bin/admin/install-mkhash-helper.sh -s + sudo /opt/bastion/bin/admin/install --new-install + sudo chmod 0755 /opt/bastion/tests + ssh-keygen -t ed25519 -f id_user -P '' + ssh-keygen -t ed25519 -f id_root -P '' + sudo env WANT_HTTP_PROXY=0 NO_SLEEP=1 user_pubkey="$(cat id_user.pub)" root_pubkey="$(cat id_root.pub)" TARGET_USER=user5000 /opt/bastion/tests/functional/docker/target_role.sh + true /opt/bastion/tests/functional/launch_tests_on_instance.sh --has-mfa=0 --has-mfa-password=1 --has-pamtester=1 --skip-consistency-check --remote-etc-bastion=/usr/local/etc/bastion 127.0.0.1 22 0 user5000 id_user id_root + sudo rsync -a /opt/bastion/etc_ssh_backup/ $SSH_DIR/ + sudo /etc/rc.d/sshd restart