Skip to content

Commit

Permalink
try running mac tests on vagrant
Browse files Browse the repository at this point in the history
  • Loading branch information
alanb-sony committed Apr 27, 2020
1 parent 448d8d9 commit 259e25e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ jobs:
echo "::set-env name=CMAKE_EXTRA_ARGS::$CMAKE_EXTRA_ARGS '-DNMOS_CPP_CONAN_BUILD_LIBS=cpprestsdk;missing'"
hostip=$(ipconfig getifaddr en0)
echo "::set-env name=HOST_IP_ADDRESS::$hostip"
echo "::set-env name=DOCKER_TEST_SUITE::true"
echo "::set-env name=VAGRANT_TEST_SUITE::true"
ifconfig
- name: mac docker install
if: matrix.os =='macos-latest'
if: false
run: |
brew install docker docker-compose docker-machine xhyve docker-machine-driver-xhyve
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
Expand Down Expand Up @@ -194,7 +194,13 @@ jobs:
if [[ "${{ env.DOCKER_TEST_SUITE }}" == "true" ]]; then
docker pull amwa/nmos-testing
docker run -d --name "nmos_testing" --entrypoint="/usr/bin/tail" -v `pwd`/results:/home/nmos-testing/results amwa/nmos-testing -f /dev/null
run_test="docker exec -it nmos_testing python3 nmos-test.py"
run_test="docker exec -i nmos_testing python3 nmos-test.py"
elif [[ "${{ env.VAGRANT_TEST_SUITE }}" == "true" ]]; then
cp ${{ github.workspace }}/.github/workflows/mac_Vagrantfile ./Vagrantfile
vagrant plugin install vagrant-scp
vagrant up
vagrant ssh -- mkdir results
run_test="vagrant ssh -- python3 nmos-test.py"
else
pip install -r requirements.txt

Expand Down Expand Up @@ -290,6 +296,10 @@ jobs:
docker stop nmos_testing
docker rm nmos_testing
fi
if [[ "${{ env.VAGRANT_TEST_SUITE }}" == "true" ]]; then
vagrant scp :results/* results/
vagrant destroy -f
fi
exit 0

- name: upload to google drive
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/mac_Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu1804"

config.vm.network "public_network", bridge: "en0"

config.vm.provision "file", source: "nmostesting", destination: "$HOME/"
config.vm.provision "file", source: "nmos-test.py", destination: "$HOME/"
config.vm.provision "file", source: "requirements.txt", destination: "$HOME/"
config.vm.provision "file", source: "config.ini", destination: "$HOME/"
config.vm.provision "file", source: "test_data", destination: "$HOME/"
config.vm.provision "file", source: "testssl", destination: "$HOME/"

config.vm.provision "shell", inline: <<-SHELL
apt-get update \
&& apt-get install -y g++ libffi-dev nodejs npm python3-pip avahi-daemon\
&& pip3 install -r requirements.txt \
&& cd testssl \
&& wget https://github.com/drwetter/testssl.sh/archive/3.0rc5.tar.gz \
&& tar -xvzf 3.0rc5.tar.gz --strip-components=1 \
&& rm 3.0rc5.tar.gz \
&& npm config set unsafe-perm true \
&& npm install -g AMWA-TV/sdpoker
SHELL
end

0 comments on commit 259e25e

Please sign in to comment.