forked from mariolpantunes/chord
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.07 KB
/
score.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
name: Evaluation
# Run this workflow every time a new commit pushed to your repository
on: push
jobs:
unit_tests:
name: Unit Tests
runs-on: self-hosted
steps:
# Checks out a copy of your repository on the self-hosted machine
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Launch DHT into background
run: |
python3 DHT.py --savelog &
PID=$!
sleep 1
ps -p $PID > /dev/null
- name: Test with pytest
timeout-minutes: 3
run: |
sleep 15
pytest
- name: DHT Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: DHT logs
path: dht.txt
retention-days: 1