the-bastion/.github/workflows/freebsd.yml

37 lines
1.5 KiB
YAML
Raw Normal View History

2020-11-17 19:47:41 +08:00
name: FreeBSD tests
on:
pull_request:
types: [labeled, synchronize]
jobs:
freebsd:
runs-on: macos-12
2020-11-17 19:47:41 +08:00
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') }}
2020-11-17 19:47:41 +08:00
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
2020-11-17 19:47:41 +08:00
- name: Functional tests under FreeBSD
uses: vmactions/freebsd-vm@v0
2020-11-17 19:47:41 +08:00
with:
usesh: true
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
/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
2020-11-17 19:47:41 +08:00
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
2021-12-16 19:10:01 +08:00
/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