fixed new compatibility issue between python 3.7 and latest ubuntu in… #107
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 | |
# We can specify which Github events will trigger a CI build | |
on: push | |
# now define a single job 'build' (but could define more) | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
python-version: [ 3.8, 3.9, '3.10', 3.11, 3.12 ] | |
include: # python 7 sometimes requires legacy versions | |
- python-version: "3.6" | |
os: "macos-13" | |
- python-version: "3.6" | |
os: "ubuntu-22.04" | |
- python-version: "3.6" | |
os: "windows-latest" | |
- python-version: "3.7" | |
os: "macos-13" | |
- python-version: "3.7" | |
os: "ubuntu-22.04" | |
- python-version: "3.7" | |
os: "windows-latest" | |
fail-fast: false | |
# a job is a seq of steps | |
steps: | |
# Next we need to checkout out repository, and set up Python | |
# A 'name' is just an optional label shown in the log - helpful to clarify progress - and can be anything | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install pytest flake8 | |
pip3 install -e . | |
- name: Install xvfb (for Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=20 --max-line-length=127 --statistics | |
- name: Run tests (for Linux) | |
if: runner.os == 'Linux' | |
run: xvfb-run pytest | |
- name: Run tests (for macOS and Windows) | |
if: runner.os != 'Linux' | |
run: pytest | |