-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 2.31 KB
/
Copy pathmain.yml
File metadata and controls
48 lines (47 loc) · 2.31 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
name: Testing workflow
on:
push:
branches: [master]
workflow_dispatch:
jobs:
build:
name: Python Test Script
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Install requirements and packages
run: |
chmod 777 install_sudo.sh
bash -f install_sudo.sh
- name: Run main script with args
run: |
echo "$(tput -T xterm setaf 2)[1/8] $(tput -T xterm setaf 4)[i] Testing help argument...$(tput -T xterm sgr0)"
python3 main.py -h
echo "$(tput -T xterm setaf 2)[2/8] $(tput -T xterm setaf 4)[i] Testing curl argument...$(tput -T xterm sgr0)"
python3 main.py -c -f google_curl.html google.com
echo "$(tput -T xterm setaf 2)[3/8] $(tput -T xterm setaf 4)[i] Testing wget argument...$(tput -T xterm sgr0)"
python3 main.py -w -f google_wget.html google.com
echo "$(tput -T xterm setaf 2)[4/8] $(tput -T xterm setaf 4)[i] Testing httrack argument...$(tput -T xterm sgr0)"
python3 main.py -H -f ./google-mirror -d 1 -eD 1 google.com
echo "$(tput -T xterm setaf 2)[5/8] $(tput -T xterm setaf 4)[i] Testing curl argument with verbosity...$(tput -T xterm sgr0)"
python3 main.py -c -v -f google_curl.html google.com
echo "$(tput -T xterm setaf 2)[6/8] $(tput -T xterm setaf 4)[i] Testing wget argument with verbosity...$(tput -T xterm sgr0)"
python3 main.py -w -v -f google_wget.html google.com
echo "$(tput -T xterm setaf 2)[7/8] $(tput -T xterm setaf 4)[i] Testing httrack argument with verbosity...$(tput -T xterm sgr0)"
python3 main.py -H -v -f ./google-mirror -d 1 -eD 1 google.com
echo "$(tput -T xterm setaf 2)[8/8] $(tput -T xterm setaf 4)[i] Testing update argument...$(tput -T xterm sgr0)"
python3 main.py -u
echo "$(tput -T xterm setaf 2)[✓] Done.$(tput -T xterm sgr0)"
- name: Zip everything
run: zip -r artifact.zip .
- name: Generate and upload artifacts
uses: actions/upload-artifact@v2
with:
name: Artifact
path: ./artifact.zip