Unit Tests #239
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: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
schedule: | |
# Nightly tests run on master by default: | |
# Scheduled workflows run on the latest commit on the default or base branch. | |
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule) | |
- cron: "0 0 * * SUN" | |
jobs: | |
test: | |
runs-on: ${{ matrix.cfg.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
cfg: | |
- { os: ubuntu-latest, python-version: 3.9} | |
- { os: macos-latest, python-version: 3.9} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.cfg.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.cfg.python-version }} | |
- name: Install package | |
run: | | |
pip install .[test] | |
- name: Test with pytest | |
run: | | |
pytest -vs |