-
Notifications
You must be signed in to change notification settings - Fork 10
77 lines (63 loc) · 2.34 KB
/
Copy pathTesting-Multi-OS.yml
File metadata and controls
77 lines (63 loc) · 2.34 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Multi-OS CI Testing
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
script-test:
name: Test ${{ matrix.setup_type }} on ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu:latest, debian:latest, kalilinux/kali-rolling:latest]
setup_type: [linux, venv, docker]
container:
image: ${{ matrix.os }}
options: --privileged -v /var/run/docker.sock:/var/run/docker.sock
steps:
- name: Prepare Environment
env:
DEBIAN_FRONTEND:
run: |
rm -rf /var/lib/apt/lists/*
apt-get clean
if [ "${{ matrix.os }}" = "kalilinux/kali-rolling:latest" ]; then
rm -f /etc/apt/sources.list.d/kali.sources
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" > /etc/apt/sources.list
apt-get update -y
cat << 'EOF' > /usr/local/bin/apt-get
#!/bin/bash
rm -f /etc/apt/sources.list.d/kali.sources
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" > /etc/apt/sources.list
if [[ "$*" == *"install"* ]]; then
/usr/bin/apt-get update -y >/dev/null 2>&1
fi
exec /usr/bin/apt-get "$@" --fix-missing --no-install-recommends
EOF
cp /usr/local/bin/apt-get /usr/local/bin/apt
chmod +x /usr/local/bin/apt-get /usr/local/bin/apt
else
apt-get update -y
fi
if [ "${{ matrix.setup_type }}" = "docker" ]; then
apt-get install -y curl sudo bash jq docker.io
else
apt-get install -y curl sudo bash jq
fi
- name: Checkout Code
uses: actions/checkout@v4
- name: Execute Storm Installation (${{ matrix.setup_type }})
shell: bash
env:
HOME: /root
run: |
if [ "${{ matrix.setup_type }}" == "linux" ]; then
bash ./setuplinux
elif [ "${{ matrix.setup_type }}" == "venv" ]; then
bash ./setupvenv
elif [ "${{ matrix.setup_type }}" == "docker" ]; then
bash ./setupdocker
fi