fix github actions triggers

This commit is contained in:
Hugues Pouillot 2024-02-06 15:35:36 +01:00 committed by Hugues Pouillot
parent 907a6becbc
commit 1fa5266f56

View file

@ -2,11 +2,7 @@ name: CI
on:
push:
paths:
- src/**
- tests/**
- scripts/**
- .github/workflows/ci.yml
branches: ["**"]
pull_request_target:
types: [labeled]
@ -19,26 +15,43 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- name: check changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
sources:
- src/**
- tests/**
- scripts/**
- name: Install Rye
if: steps.changes.outputs.sources == 'true'
uses: eifinger/setup-rye@v1
with:
enable-cache: true
cache-prefix: 'refiners-rye-cache'
cache-prefix: "refiners-rye-cache"
- name: add home shims dir to PATH
if: steps.changes.outputs.sources == 'true'
run: echo "$HOME/.rye/shims" >> $GITHUB_PATH
- name: pin python
if: steps.changes.outputs.sources == 'true'
run: rye pin 3.10
- name: rye sync
if: steps.changes.outputs.sources == 'true'
run: rye sync --all-features
- name: ruff format
if: steps.changes.outputs.sources == 'true'
run: rye run ruff format --check .
- name: ruff check
if: steps.changes.outputs.sources == 'true'
run: rye run ruff check .
- name: typecheck
if: steps.changes.outputs.sources == 'true'
run: rye run pyright