mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-22 06:08: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:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
branches: ["**"]
|
||||||
- src/**
|
|
||||||
- tests/**
|
|
||||||
- scripts/**
|
|
||||||
- .github/workflows/ci.yml
|
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [labeled]
|
types: [labeled]
|
||||||
|
|
||||||
|
@ -19,26 +15,43 @@ jobs:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: check changes
|
||||||
|
uses: dorny/paths-filter@v3
|
||||||
|
id: changes
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
sources:
|
||||||
|
- src/**
|
||||||
|
- tests/**
|
||||||
|
- scripts/**
|
||||||
|
|
||||||
- name: Install Rye
|
- name: Install Rye
|
||||||
|
if: steps.changes.outputs.sources == 'true'
|
||||||
uses: eifinger/setup-rye@v1
|
uses: eifinger/setup-rye@v1
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-prefix: 'refiners-rye-cache'
|
cache-prefix: "refiners-rye-cache"
|
||||||
|
|
||||||
- name: add home shims dir to PATH
|
- name: add home shims dir to PATH
|
||||||
|
if: steps.changes.outputs.sources == 'true'
|
||||||
run: echo "$HOME/.rye/shims" >> $GITHUB_PATH
|
run: echo "$HOME/.rye/shims" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: pin python
|
- name: pin python
|
||||||
|
if: steps.changes.outputs.sources == 'true'
|
||||||
run: rye pin 3.10
|
run: rye pin 3.10
|
||||||
|
|
||||||
- name: rye sync
|
- name: rye sync
|
||||||
|
if: steps.changes.outputs.sources == 'true'
|
||||||
run: rye sync --all-features
|
run: rye sync --all-features
|
||||||
|
|
||||||
- name: ruff format
|
- name: ruff format
|
||||||
|
if: steps.changes.outputs.sources == 'true'
|
||||||
run: rye run ruff format --check .
|
run: rye run ruff format --check .
|
||||||
|
|
||||||
- name: ruff check
|
- name: ruff check
|
||||||
|
if: steps.changes.outputs.sources == 'true'
|
||||||
run: rye run ruff check .
|
run: rye run ruff check .
|
||||||
|
|
||||||
- name: typecheck
|
- name: typecheck
|
||||||
|
if: steps.changes.outputs.sources == 'true'
|
||||||
run: rye run pyright
|
run: rye run pyright
|
||||||
|
|
Loading…
Reference in a new issue