-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (53 loc) · 1.85 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Pallium Tests
on: [push, workflow_dispatch]
jobs:
Run-Pallium-Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- name: Set up Python and Go
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Display environment info
run: id && go version
- name: Install dependencies
run: |
sudo ./install.sh --noconfirm --dependencies-only --test-dependencies
sudo apt-get -y install python3-seccomp openvpn tor nftables dnsmasq isc-dhcp-client socat
sudo systemctl disable dnsmasq.service
sudo pip install python-digitalocean python-dotenv
- name: Install pallium
run: sudo pip install -vvvv .
- name: Prepare environment
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
run: |
mkdir -p ~/.ssh
echo "$SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
sudo mkdir -p /root/.ssh
sudo cp ~/.ssh/id_rsa /root/.ssh/id_rsa
sudo chmod 600 /root/.ssh/id_rsa
sudo systemctl stop systemd-resolved
sudo bash -c 'rm /etc/resolv.conf
echo "nameserver 1.1.1.1" > /etc/resolv.conf'
sudo iptables -P FORWARD ACCEPT
sudo ip6tables -P FORWARD ACCEPT
#- name: Setup upterm session
# uses: lhotari/action-upterm@v1
- name: Populate .env
env:
DOTENV: ${{ secrets.DOTENV }}
run: echo "$DOTENV" > tests/.env
- name: Run sandbox tests
timeout-minutes: 30
run: cd tests && python test_sandbox.py -v
- name: Run API tests
timeout-minutes: 30
env:
DIGITALOCEAN_API_KEY: ${{ secrets.DIGITALOCEAN_API_KEY }}
run: cd tests && sudo -E python test_api.py -v