-
Notifications
You must be signed in to change notification settings - Fork 59
44 lines (34 loc) · 911 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on:
push:
paths:
- src/**
- tests/**
- scripts/**
- .github/workflows/ci.yml
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