Skip to content

Python Update: Bump packaging from 24.1 to 24.2 (#69) #216

Python Update: Bump packaging from 24.1 to 24.2 (#69)

Python Update: Bump packaging from 24.1 to 24.2 (#69) #216

Workflow file for this run

name: Python Checking
on:
push:
branches:
- '**'
tags-ignore:
- '**'
paths:
- '**.py'
- ".github/workflows/python.yml"
- "pyproject.toml"
- "poetry.lock"
- "Makefile"
pull_request:
jobs:
Lint:
if: github.event_name == 'push'
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [ '3.10', '3.11', '3.12', 'pypy3.9', 'pypy3.10' ]
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-latest
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
exclude:
- os: macos-latest
python-version: 'pypy3.9'
- os: windows-latest
python-version: 'pypy3.9'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
virtualenvs-in-project: false
- name: Pip Cache
uses: actions/cache@v4
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
${{ runner.os }}-pip
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel
poetry install
- name: Lint
run: |
make lint
- name: Test
run: |
make test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
env_vars: OS,PYTHON
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build
run: |
pip install wheel twine --quiet
poetry build
twine check --strict dist/*
Clean-Install:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
virtualenvs-in-project: false
- name: Build
run: |
pip install wheel twine --quiet
poetry build
twine check --strict dist/*