Skip to content

Bump pytest from 7.4.4 to 8.1.0 #830

Bump pytest from 7.4.4 to 8.1.0

Bump pytest from 7.4.4 to 8.1.0 #830

Workflow file for this run

name: CI
env:
RUFF_UNRELEASED_REF: 'main'
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: |
pyproject.toml
requirements.txt
requirements-dev.txt
- name: Install dependencies
run: just install
- name: Run checks
run: just check
ruff-versions:
name: Generate test versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get install -y ripgrep
- name: Determine test versions
id: set-versions
run: |
# Get the latest release version from GitHub
LATEST=$( \
curl -L \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/astral-sh/ruff/releases/latest \
| jq '.tag_name' --raw-output \
| cut -c2- \
)
# Get the oldest supported version from the pyproject.toml
OLDEST=$(rg -No '"ruff>=(.*)"' -r '$1' pyproject.toml)
UNRELEASED=${{ env.RUFF_UNRELEASED_REF }}
echo "::set-output name=latest::$LATEST"
echo "::set-output name=oldest::$OLDEST"
echo "::set-output name=dev::$UNRELEASED"
outputs:
latest: ${{ steps.set-versions.outputs.latest }}
oldest: ${{ steps.set-versions.outputs.oldest }}
dev: ${{ steps.set-versions.outputs.dev }}
test:
name: Test (python-${{ matrix.python-version }}, ruff-${{ matrix.ruff-version }}, ${{ matrix.os }})
needs: ruff-versions
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- ruff-version: ${{ needs.ruff-versions.outputs.latest }}
- ruff-version: ${{ needs.ruff-versions.outputs.oldest }}
os: ubuntu-latest
python-version: "3.7"
- ruff-version: ${{ needs.ruff-versions.outputs.dev }}
os: ubuntu-latest
python-version: "3.12"
runs-on: ${{ matrix.os }}
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
pyproject.toml
requirements.txt
requirements-dev.txt
- name: Install dependencies
run: |
pip install -U pip
just install
- name: Install test Ruff version from PyPI
if: ${{ matrix.ruff-version != env.RUFF_UNRELEASED_REF }}
run: |
pip install ruff==${{ matrix.ruff-version }}
ruff --version
- name: "Install test Ruff version from GitHub"
if: ${{ matrix.ruff-version == env.RUFF_UNRELEASED_REF }}
run: |
pip install --force-reinstall git+https://github.com/astral-sh/ruff@${{ matrix.ruff-version }}
pip show ruff
ruff version
- name: Run tests
run: just test