Skip to content

Switch to rye and ruff #2

Switch to rye and ruff

Switch to rye and ruff #2

Workflow file for this run

---
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["[email protected]", "[email protected]", "3.8", "3.9", "3.10", "3.11", "3.12"]
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: eifinger/setup-rye@v3
id: setup-rye
with:
enable-cache: true
cache-prefix: ${{ matrix.python-version }}
- name: pin python-version ${{ matrix.python-version }}
if: steps.setup-rye.outputs.cache-hit != 'true'
run: rye pin ${{ matrix.python-version }}
- name: install dependencies
if: steps.setup-rye.outputs.cache-hit != 'true'
run: |
rye sync --no-lock
- name: run ruff
uses: chartboost/ruff-action@v1
- name: run tests
run: |
echo '```' > pytest.log
rye test | tee -a pytest.log
echo '```' >> pytest.log
- name: PR comment pytest output
uses: thollander/actions-comment-pull-request@v2
with:
filePath: pytest.log
if: github.event_name == 'pull_request'