forked from google/pytype
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 2.23 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
push:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
shard: [shard_1, shard_2, shard_3, shard_4] # Keep this synced with ALL_TESTS_SHARD_COUNT
os: [ubuntu-20.04]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
experimental: [false]
include:
- os: macos-latest
python-version: '3.12'
experimental: false
- os: windows-latest
python-version: '3.12'
experimental: true
# - os: ubuntu-20.04
# python-version: '3.13'
# experimental: true
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install system packages
if: runner.os == 'Linux'
run: sudo apt-get install -y bison cmake flex g++
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Build
run: python build_scripts/build.py
- name: Run Tests
run: python build_scripts/run_tests.py -f -v test_all_${{ matrix.shard }}_of_4 # Keep this synced with ALL_TESTS_SHARD_COUNT
continue-on-error: ${{ matrix.experimental }}
lint:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install system packages
if: runner.os == 'Linux'
run: sudo apt-get install -y bison cmake flex g++
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Lint
if: runner.os == 'Linux' && matrix.python-version == '3.12'
run: pylint build_scripts pytype pytype_extensions setup.py
- name: Build
run: python build_scripts/build.py
- name: Type Check
run: python out/bin/pytype -j auto