-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 1.92 KB
/
testing.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
54
55
56
57
58
name: python-unit-tests
on:
pull_request:
types:
- opened
- edited
- reopened
- ready_for_review
- synchronize
jobs:
python-unit-tests:
name: Python Unit Tests
runs-on: ubuntu-20.04
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
mkdir ~/.ssh/
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
- name: Setup git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
- name: Install Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dnas/requirements.txt
sudo apt-get install -y whois
- name: Run the Python unit tests
working-directory: /home/runner/work/dfz_name_and_shame/dfz_name_and_shame/
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
sudo mkdir /media/usb0
sudo chmod 777 /media/usb0
python3 dnas/tests/test_git.py -vv
python3 dnas/tests/test_bogon_asn.py -vv
python3 dnas/tests/test_bogon_ip.py -vv
python3 dnas/tests/test_mrt_archive.py -vv
python3 dnas/tests/test_mrt_archives.py -vv
python3 dnas/tests/test_mrt_entry.py -vv
python3 dnas/tests/test_mrt_getter.py -vv
python3 dnas/tests/test_mrt_parser.py -vv
python3 dnas/tests/test_mrt_splitter.py -vv
python3 dnas/tests/test_mrt_stats.py -vv
python3 dnas/tests/test_whois.py -vv