Unit Tests #94
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: Unit Tests | |
on: | |
push: | |
# Check on all branches | |
branches: | |
- '*' | |
# Run only if specific code files change | |
paths: | |
- '**/*.py' | |
- '**/*.c' | |
schedule: | |
- cron: '0 0 */14 * *' # Runs every 14 days | |
jobs: | |
test: | |
if: github.event_name == 'push' && (contains(join(github.event.commits.*.modified), '.py') || contains(join(github.event.commits.*.modified), '.c')) || github.event_name == 'schedule' | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: [3.8] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check Out Code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
bash install.sh | |
working-directory: ./ | |
- name: Run Unit Tests | |
run: | | |
python -m unittest discover -s tests -p "*_test.py" | |
working-directory: ./ |