Try functional test

This commit is contained in:
Jamil Bou Kheir
2021-06-28 18:48:24 -07:00
parent 05ad27482b
commit faf6e328c5
4 changed files with 35 additions and 60 deletions

View File

@@ -1,24 +1,21 @@
#!/usr/bin/env bash
set -x
set -xe
sudo apt-get update
sudo apt-get install -y postgresql \
wireguard iptables net-tools curl ca-certificates
sudo systemctl start postgresql
sudo dpkg -i cloudfire*.deb
echo "Enabling service..."
sudo systemctl start cloudfire
echo "Setting capabilities"
sudo setcap "cap_net_admin+ep" cloudfire
sudo setcap "cap_net_raw+ep" cloudfire
sudo setcap "cap_dac_read_search+ep" cloudfire
./cloudfire &
# Wait for app to start
sleep 10
echo "Service status..."
sudo systemctl status cloudfire.service
echo "Printing service logs..."
sudo journalctl -u cloudfire.service
echo "Trying to load homepage..."
curl -i -vvv -k https://$(hostname):8800/

View File

@@ -3,9 +3,13 @@ set -e
os_name='ubuntu~bionic'
sudo apt-get install wget
wget -O erlang.deb https://packages.erlang-solutions.com/erlang/debian/pool/esl-erlang_24.0.2-1~${os_name}_${arch}.deb
wget -O elixir.deb https://packages.erlang-solutions.com/erlang/debian/pool/elixir_1.12.0-1~${os_name}_all.deb
sudo dpkg -i erlang.deb
sudo dpkg -i elixir.deb
sudo apt-get install --fix-missing
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -

View File

@@ -88,48 +88,31 @@ jobs:
bash -c '.ci/install_runtimes.sh'
bash -c '.ci/build_release.sh'
# build:
# needs: unit-integration-test
# runs-on: ubuntu-18.04
# strategy:
# matrix:
# os: [ubuntu-18.04]
# env:
# MATRIX_OS: ${{ matrix.os }}
# steps:
# - name: Install runtimes
# run: .ci/install_runtimes.sh
# - name: Build release
# env:
# MIX_ENV: prod
# run: .ci/build_release.sh
# - name: Build deb
# run: .ci/build_deb.sh
# - name: Rename Built Artifacts
# run: .ci/rename_artifacts.sh
# - uses: actions/upload-artifact@v2
# with:
# name: cloudfire-deb
# path: "cloudfire*.deb"
- name: Rename Built Artifacts
run: .ci/rename_artifacts.sh
- uses: actions/upload-artifact@v2
with:
name: cloudfire-${{ matrix.arch }}
path: "_build/prod/rel/cloudfire/bin/cloudfire"
# functional-test:
# needs: build-linux
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-20.04]
# env:
# MATRIX_OS: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - uses: actions/download-artifact@v2
# with:
# name: cloudfire-deb
# - name: Test Install package
# env:
# DEBIAN_FRONTEND: noninteractive
# run: .ci/functional_test.sh
functional-test:
needs: build-linux
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04]
env:
MATRIX_OS: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: cloudfire-amd64
- name: Test Install package
env:
DEBIAN_FRONTEND: noninteractive
run: .ci/functional_test.sh
#
# publish:
# needs: functional-test

View File

@@ -42,17 +42,8 @@ For now, CloudFire assumes these apps are all running on the same host.
## Setup
Currently, the only supported method of running CloudFire is locally. MacOS and
Linux users shouldn't have any problems. Windows will Probably Work™.
`curl https://github.com/CloudFire-LLC/cloudfire/releases/download/latest/cloudfire-init.sh | sudo bash -E`
You'll need recent versions of the following tools installed:
- ansible
- vagrant
- VirtualBox
With the above installed, you should be able to navigate into the project root
and just run:
```bash
vagrant up