Skip to content

Bump ruff from 0.2.2 to 0.4.8 #386

Bump ruff from 0.2.2 to 0.4.8

Bump ruff from 0.2.2 to 0.4.8 #386

Workflow file for this run

name: Test
env:
# Enable colored output for pytest
# https://github.com/pytest-dev/pytest/issues/7443
# https://github.com/actions/runner/issues/241
PY_COLORS: 1
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
permissions:
contents: read
# Limit concurrency by workflow/branch combination.
#
# For pull request builds, pushing additional changes to the
# branch will cancel prior in-progress and pending builds.
#
# For builds triggered on a branch push, additional changes
# will wait for prior builds to complete before starting.
#
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
python-tests:
name: Python ${{ matrix.python-version }}, Poetry ${{ matrix.poetry-version}}, ${{ matrix.os }}
strategy:
matrix:
os:
- "Ubuntu"
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
poetry-version:
- "1.2"
- "1.3"
- "1.4"
- "1.5"
- "1.6"
- "1.7"
include:
# Run 3.12 tests with relaxed constraints
- python-version: "3.12"
os: "Ubuntu"
relax: true
# Run Windows and macOS tests for a single Poetry/Python pair
- os: "Windows"
python-version: "3.12"
poetry-version: "1.7"
- os: "macOS"
python-version: "3.12"
poetry-version: "1.7"
exclude:
# The following Poetry versions do not support Python 3.12
- python-version: "3.12"
poetry-version: 1.2
- python-version: "3.12"
poetry-version: 1.3
- python-version: "3.12"
poetry-version: 1.4
fail-fast: false
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# TODO: This appears to require poetry to be installed before usage
# cache: "poetry"
- name: Install Poetry ${{ matrix.poetry-version }}
run: |
pip install "poetry~=${{ matrix.poetry-version }}.0"
# Ensure that Poetry is not upgraded past the version we are testing
poetry add "poetry@~${{ matrix.poetry-version }}" --lock
- name: Install packages
run: |
poetry install
- name: Relax constraints
if: ${{ matrix.relax }}
run: |
# Install the plugin
poetry self add $(pwd)
poetry relax --update
- name: Run tests
run: |
poetry run -- pytest tests