mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-09 23:12:02 +00:00
a08e04c5af
for reference, documentation is here: ttps://docs.github.com/en/actions/learn-github-actions/contexts#github-context
40 lines
816 B
YAML
40 lines
816 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request_target:
|
|
types: [labeled]
|
|
|
|
jobs:
|
|
lint_and_typecheck:
|
|
if: ${{ github.event_name == 'push' || github.event.label.name == 'run-ci' }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rye
|
|
uses: eifinger/setup-rye@v1
|
|
with:
|
|
enable-cache: true
|
|
cache-prefix: 'refiners-rye-cache'
|
|
|
|
- name: add home shims dir to PATH
|
|
run: echo "$HOME/.rye/shims" >> $GITHUB_PATH
|
|
|
|
- name: pin python
|
|
run: rye pin 3.10
|
|
|
|
- name: rye sync
|
|
run: rye sync --all-features
|
|
|
|
- name: ruff format
|
|
run: rye run ruff format --check .
|
|
|
|
- name: ruff check
|
|
run: rye run ruff check .
|
|
|
|
- name: typecheck
|
|
run: rye run pyright
|