Skip to content

Python package

Python package #583

name: Python package
on:
push:
pull_request:
workflow_dispatch:
# Schedule a nightly build. Times are UTC
# See https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events
schedule:
# 5:15 am UTC (https://en.wikipedia.org/wiki/5:15)
- cron: '15 5 * * *'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true
fail-fast: false
matrix:
# Default builds are on Ubuntu
os: [ubuntu-latest]
# python-version: [3.7, 3.8, 3.9, pypy-3.7]
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.9']
include:
# Also test on macOS and Windows using latest Python 3
- os: macos-latest
python-version: 3.x
- os: windows-latest
python-version: 3.x
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
python -m pip install 'pycodestyle>=2.6.0'
- name: Test with unittest
run: |
python -m unittest discover -s test