Skip to content

edited automatic pip release workflow #102

edited automatic pip release workflow

edited automatic pip release workflow #102

Workflow file for this run

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.7, 3.8, 3.9, '3.10', 3.11, 3.12 ]
exclude: # Apple Silicon ARM64 does not support Python < v3.8
- python-version: "3.6"
os: macos-latest
- python-version: "3.7"
os: macos-latest
include: # So run those legacy versions on Intel CPUs
- python-version: "3.6"
os: macos-13
- python-version: "3.7"
os: macos-13
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