-
Notifications
You must be signed in to change notification settings - Fork 61
45 lines (37 loc) · 1.16 KB
/
ty.yml
File metadata and controls
45 lines (37 loc) · 1.16 KB
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
45
name: Ty Type Checks
on:
pull_request:
branches:
- "develop"
concurrency:
group: ${{ github.workflow_ref }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ty:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46.0.3
- name: Filter Python files
id: filter-python
run: |
python_files=()
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == *.py ]]; then
python_files+=("${file}")
fi
done
echo "python_files=${python_files[*]}" >> $GITHUB_ENV
- name: Run ty
if: ${{ env.python_files != '' }}
run: |
echo "Running ty on changed files: ${{ env.python_files }}"
uv run ty check --output-format concise --python-version 3.12 --exclude "**/tests/**" --exclude "**/codegen_tests/**" ${{ env.python_files }}