2020-11-17 19:47:41 +08:00
|
|
|
name: FreeBSD tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [labeled, synchronize]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
freebsd:
|
|
|
|
runs-on: macos-latest
|
|
|
|
name: FreeBSD
|
2021-06-08 00:38:16 +08:00
|
|
|
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') }}
|
2020-11-17 19:47:41 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Functional tests under FreeBSD
|
2021-05-20 21:52:22 +08:00
|
|
|
uses: vmactions/freebsd-vm@main
|
2020-11-17 19:47:41 +08:00
|
|
|
with:
|
|
|
|
usesh: true
|
2021-02-14 02:44:32 +08:00
|
|
|
sync: sshfs
|
2020-11-17 19:47:41 +08:00
|
|
|
run: |
|
|
|
|
set -ex
|
|
|
|
freebsd-version
|
|
|
|
mount -o acls /
|
2021-06-02 17:36:59 +08:00
|
|
|
pkg install -y bash rsync ca_root_nss jq fping screen flock curl
|
2020-11-17 19:47:41 +08:00
|
|
|
mkdir -p /opt/bastion
|
|
|
|
rsync -a . /opt/bastion/
|
|
|
|
/opt/bastion/bin/admin/packages-check.sh -i
|
2020-11-18 03:27:42 +08:00
|
|
|
/opt/bastion/bin/admin/install-ttyrec.sh -s
|
2020-12-30 17:56:41 +08:00
|
|
|
/opt/bastion/bin/admin/install-yubico-piv-checker.sh -s
|
2021-06-08 00:38:16 +08:00
|
|
|
/opt/bastion/bin/admin/install --new-install
|
2020-11-17 19:47:41 +08:00
|
|
|
ssh-keygen -t ed25519 -f id_user
|
|
|
|
ssh-keygen -t ed25519 -f id_root
|
2021-06-08 00:38:16 +08:00
|
|
|
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 --module=500-http-proxy.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
|