Skip to content

Update from base vm #203

Update from base vm

Update from base vm #203

Workflow file for this run

name: Test
on:
workflow_dispatch:
release:
types: [ published ]
push:
branches:
- '*'
paths:
- '**.sh'
- '.github/workflows/test.yml'
- 'index.js'
- 'conf/*'
- 'hooks/*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
testsshfs:
if: ${{ !contains(github.repository, 'solaris') && !contains(github.repository, 'dragonflybsd') && !contains(github.repository, 'omnios')}}
strategy:
matrix:
release: [ "7.3", "7.4", "7.5", "7.6", ""]
arch: [ "aarch64", ""]
runs: [ "ubuntu-24.04"]
runs-on: ${{ matrix.runs }}
name: sshfs OpenBSD
env:
MYTOKEN : ${{ secrets.MYTOKEN }}
MYTOKEN2: "value2"
SEC_VBOX : ${{ secrets.SEC_VBOX }}
DEBUG: 1
steps:
- uses: actions/checkout@v4
- name: Check arch
id: check
run: |
_release="${{ matrix.release }}"
if [ -z "$_release" ]; then
. conf/default.release.conf
_release="$DEFAULT_RELEASE"
fi
_arch="${{ matrix.arch }}"
if [ "${_arch}" = "x86_64" ]; then
_arch=""
fi
if [ -z "${_arch}" ]; then
#ok, go ahead
echo "arch is empty"
echo "run=true" >> $GITHUB_OUTPUT
elif [ -e "conf/${_release}-${_arch}.conf" ]; then
#ok, go ahead
echo "conf exists: conf/${_release}-${_arch}.conf"
echo "run=true" >> $GITHUB_OUTPUT
else
echo "The release ${_release} doesn't support ${_arch}, skip."
echo "run=false" >> $GITHUB_OUTPUT
fi
- name: Creating Web console
if: ${{ steps.check.outputs.run == 'true' }}
uses: vmactions/cf-tunnel@v0
id: tunnel
with:
protocol: http
port: 8000
- name: Test in OpenBSD
if: ${{ steps.check.outputs.run == 'true' }}
id: test
uses: vmactions/openbsd-vm@b23687acb12d71c0764985dd48a84af728439dc4
with:
envs: 'DEBUG MYTOKEN MYTOKEN2'
prepare: |
pkg_add curl
release: ${{ matrix.release }}
arch: ${{ matrix.arch }}
nat: |
"10022": "22"
"8080": "80"
"8443": "443"
udp:"8081": "80"
usesh: true
sync: sshfs
run: |
ls -lah /root/work
tree $HOME/work/
if [ -z "$(ls -A $HOME/work)" ]; then
echo "sshfs error."
exit 1
fi
echo "TEST_ENV=abc" >>${GITHUB_ENV}
pwd
ls -lah
whoami
env
sysctl hw.model
sysctl hw.ncpu
sysctl hw.physmem
sysctl hw.usermem
- name: Test NAT
if: ${{ steps.check.outputs.run == 'true' }}
run:
echo "TEST_ENV=$TEST_ENV"
[ "$TEST_ENV" = "abc" ]
ssh -vvv -p 10022 -i $HOME/.ssh/host.id_rsa root@localhost "uname -a;whoami;pwd"
- name: Test custom shell
if: ${{ steps.check.outputs.run == 'true' }}
shell: openbsd {0}
run: |
pwd
cd $GITHUB_WORKSPACE;
pwd
pwd
ls -lah
whoami
env
sysctl hw.model
sysctl hw.ncpu
sysctl hw.physmem
sysctl hw.usermem
testnfs:
strategy:
matrix:
release: [ "7.3", "7.4", "7.5", "7.6", ""]
arch: [ "aarch64", ""]
runs: [ "ubuntu-24.04"]
runs-on: ${{ matrix.runs }}
name: nfs OpenBSD
env:
MYTOKEN : ${{ secrets.MYTOKEN }}
MYTOKEN2: "value2"
SEC_VBOX : ${{ secrets.SEC_VBOX }}
DEBUG: 1
steps:
- uses: actions/checkout@v4
- name: Check arch
id: check
run: |
_release="${{ matrix.release }}"
if [ -z "$_release" ]; then
. conf/default.release.conf
_release="$DEFAULT_RELEASE"
fi
_arch="${{ matrix.arch }}"
if [ "${_arch}" = "x86_64" ]; then
_arch=""
fi
if [ -z "${_arch}" ]; then
#ok, go ahead
echo "arch is empty"
echo "run=true" >> $GITHUB_OUTPUT
elif [ -e "conf/${_release}-${_arch}.conf" ]; then
#ok, go ahead
echo "conf exists: conf/${_release}-${_arch}.conf"
echo "run=true" >> $GITHUB_OUTPUT
else
echo "The release ${_release} doesn't support ${_arch}, skip."
echo "run=false" >> $GITHUB_OUTPUT
fi
- name: Creating Web console
if: ${{ steps.check.outputs.run == 'true' }}
uses: vmactions/cf-tunnel@v0
id: tunnel
with:
protocol: http
port: 8000
- name: Test in OpenBSD
if: ${{ steps.check.outputs.run == 'true' }}
id: test
uses: vmactions/openbsd-vm@b23687acb12d71c0764985dd48a84af728439dc4
with:
envs: 'DEBUG MYTOKEN MYTOKEN2'
prepare: |
pkg_add curl
release: ${{ matrix.release }}
arch: ${{ matrix.arch }}
nat: |
"10022": "22"
"8080": "80"
"8443": "443"
udp:"8081": "80"
usesh: true
sync: nfs
run: |
ls -lah /root/work
tree $HOME/work/
if [ -z "$(ls -A $HOME/work)" ]; then
echo "nfs error."
exit 1
fi
echo "TEST_ENV=abc" >>${GITHUB_ENV}
pwd
ls -lah
whoami
env
sysctl hw.model
sysctl hw.ncpu
sysctl hw.physmem
sysctl hw.usermem
- name: Test NAT
if: ${{ steps.check.outputs.run == 'true' }}
run:
echo "TEST_ENV=$TEST_ENV"
[ "$TEST_ENV" = "abc" ]
ssh -vvv -p 10022 -i $HOME/.ssh/host.id_rsa root@localhost "uname -a;whoami;pwd"
- name: Test custom shell
if: ${{ steps.check.outputs.run == 'true' }}
shell: openbsd {0}
run: |
pwd
cd $GITHUB_WORKSPACE;
pwd
pwd
ls -lah
whoami
env
sysctl hw.model
sysctl hw.ncpu
sysctl hw.physmem
sysctl hw.usermem
test:
strategy:
matrix:
release: [ "7.3", "7.4", "7.5", "7.6", ""]
arch: [ "aarch64", ""]
runs: [ "ubuntu-24.04"]
runs-on: ${{ matrix.runs }}
name: OpenBSD
env:
MYTOKEN : ${{ secrets.MYTOKEN }}
MYTOKEN2: "value2"
SEC_VBOX : ${{ secrets.SEC_VBOX }}
steps:
- uses: actions/checkout@v4
- name: Check arch
id: check
run: |
_release="${{ matrix.release }}"
if [ -z "$_release" ]; then
. conf/default.release.conf
_release="$DEFAULT_RELEASE"
fi
_arch="${{ matrix.arch }}"
if [ "${_arch}" = "x86_64" ]; then
_arch=""
fi
if [ -z "${_arch}" ]; then
#ok, go ahead
echo "arch is empty"
echo "run=true" >> $GITHUB_OUTPUT
elif [ -e "conf/${_release}-${_arch}.conf" ]; then
#ok, go ahead
echo "conf exists: conf/${_release}-${_arch}.conf"
echo "run=true" >> $GITHUB_OUTPUT
else
echo "The release ${_release} doesn't support ${_arch}, skip."
echo "run=false" >> $GITHUB_OUTPUT
fi
- name: Test in OpenBSD
if: ${{ steps.check.outputs.run == 'true' }}
id: test
uses: vmactions/openbsd-vm@b23687acb12d71c0764985dd48a84af728439dc4
with:
envs: 'MYTOKEN MYTOKEN2'
prepare: |
pkg_add curl
mem: 4096
release: ${{ matrix.release }}
arch: ${{ matrix.arch }}
nat: |
"10022": "22"
"8080": "80"
"8443": "443"
udp:"8081": "80"
usesh: true
run: |
echo "TEST_ENV=abc" >>${GITHUB_ENV}
pwd
ls -lah
whoami
env
sysctl hw.model
sysctl hw.ncpu
sysctl hw.physmem
sysctl hw.usermem
- name: Test NAT
if: ${{ steps.check.outputs.run == 'true' }}
run:
echo "TEST_ENV=$TEST_ENV"
[ "$TEST_ENV" = "abc" ]
ssh -vvv -p 10022 -i $HOME/.ssh/host.id_rsa root@localhost "uname -a;whoami;pwd"
- name: Test custom shell
if: ${{ steps.check.outputs.run == 'true' }}
shell: openbsd {0}
run: |
pwd
cd $GITHUB_WORKSPACE;
pwd
pwd
ls -lah
whoami
env
sysctl hw.model
sysctl hw.ncpu
sysctl hw.physmem
sysctl hw.usermem