mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-21 13:48:46 +00:00
fix github actions triggers
This commit is contained in:
parent
907a6becbc
commit
1fa5266f56
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue