Run Unit Tests #347
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Unit Tests | |
on: | |
schedule: | |
- cron: '0 6 * * *' # This will run the workflow daily at 06:00 UTC (02:00 EST) | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Set up a virtual environment and install dependencies | |
run: | | |
cd "Python Code" | |
python -m venv env | |
source env/bin/activate | |
python -m pip install --upgrade pip | |
pip install unittest2 | |
pip install requests | |
pip install numpy | |
pip install sympy | |
pip install matplotlib | |
pip install iteration_utilities | |
pip install -U scikit-learn | |
- name: Run Tests and Email Results | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
SENDER_EMAIL: ${{ secrets.SENDER_EMAIL }} | |
RECEIVER_EMAIL: ${{ secrets.RECEIVER_EMAIL }} | |
run: | | |
cd "Python Code" | |
source env/bin/activate | |
python run_Utests.py |