Python script and Test Runner #46
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: Python script and Test Runner | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: '0 2 * * 1' | |
workflow_dispatch: # This allows the action to be run manually from the Actions tab | |
jobs: | |
build: | |
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.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r stories/date/requirement.txt | |
- name: Run Python scripts | |
run: | | |
python stories/date/scripts/autobiographies.py | |
python stories/date/scripts/daybooks.py | |
python stories/date/scripts/journals.py | |
- name: Run Python tests | |
run: | | |
python -m unittest discover -s stories/date/test -p '*Test.py' | |