-
Notifications
You must be signed in to change notification settings - Fork 287
56 lines (55 loc) · 1.81 KB
/
pyrefly.yml
File metadata and controls
56 lines (55 loc) · 1.81 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
46
47
48
49
50
51
52
53
54
55
56
name: pyrefly
on:
push:
paths:
- '**/*'
- '!.*'
- '.github/workflows/pyrefly.yml'
pull_request:
schedule:
- cron: '0 12 * * 1' # 12pm Monday
workflow_call:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- os: windows-latest
github_env: $env:GITHUB_ENV
steps:
- uses: actions/checkout@v6
- name: set windows cargo home
# we need to set CARGO_HOME to a high-up directory on Windows machines, since some dependencies cloned
# by Cargo have long paths and will cause builds/tests to fail
if: ${{ matrix.os == 'windows-latest' }}
run: echo "CARGO_HOME=C:\\cargo" >> ${{ matrix.github_env }}
- name: install Scrut
run: cargo install scrut
# Scrut doesn't support Windows yet
if: ${{ matrix.os != 'windows-latest' }}
- name: set up rust cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: pyrefly
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2025-12-05
components: clippy, rustfmt
- run: cargo fmt -- --check
- run: cargo clippy --release
- run: cargo build --release
- run: cargo test --release
- name: Run Scrut tests
env:
PYREFLY: ${{ github.workspace }}/target/release/pyrefly
TYPESHED_ROOT: ${{ github.workspace }}/crates/pyrefly_bundled/third_party
JQ: jq
TEST_PY: ${{ github.workspace }}/test.py
PYREFLY_PY: ${{ github.workspace }}/pyrefly/python
TENSOR_TEST_ROOT: ${{ github.workspace }}/test/tensor_shapes
JAXTYPING_TEST_ROOT: ${{ github.workspace }}/test/tensor_shapes
run: env -u GITHUB_ACTIONS scrut test test
if: ${{ matrix.os != 'windows-latest' }}