Skip to content

Update pythonpublish.yml #216

Update pythonpublish.yml

Update pythonpublish.yml #216

Workflow file for this run

name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Upgrade pip and install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "setuptools==69" "wheel" "setuptools_scm[toml]>=6.2"
- name: Install dependencies
run: |
pip install .
- name: Clean previous build artifacts
run: |
rm -rf build dist *.egg-info
- name: Lint with flake8
run: |
pip install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest==6.2.4
pytest