CI #499
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
# Run daily at 2:34 UTC | |
schedule: | |
- cron: '34 2 * * *' | |
workflow_dispatch: | |
# Cancel existing runs when a new push happens | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
include: | |
- os: macos-latest | |
python-version: "3.8" | |
- os: macos-latest | |
python-version: "3.12" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install . | |
python -m pip --quiet install ipythonblocks matplotlib pytest | |
python -m pip list | |
#---------------------------------------------- | |
# load pip cache if cache exists | |
#---------------------------------------------- | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip | |
restore-keys: ${{ runner.os }}-pip | |
- name: Run unit tests | |
run: | | |
pytest |