the-bastion/.github/workflows/freebsd.yml
2022-03-14 12:42:26 +01:00

33 lines
1.4 KiB
YAML

name: FreeBSD tests
on:
pull_request:
types: [labeled, synchronize]
jobs:
freebsd:
runs-on: macos-10.15
name: FreeBSD
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@v2
- name: Functional tests under FreeBSD
uses: vmactions/freebsd-vm@main
with:
usesh: true
sync: sshfs
run: |
set -ex
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 --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