Skip to content

Trigger Build

Trigger Build #18

Workflow file for this run

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@v3
with:
name: DHT logs
path: dht.txt
retention-days: 1