-
Notifications
You must be signed in to change notification settings - Fork 125
79 lines (76 loc) · 2.59 KB
/
test.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
name: Python package
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
pytorch-version: ["1.4.0", "1.5.1", "1.6.0", "1.7.1", "1.8", "1.9", "1.10", "1.11", "1.12", "1.13", "2.0", "2.1", "2.2"]
include:
- python-version: 3.11
pytorch-version: 2.0
- python-version: 3.11
pytorch-version: 2.1
- python-version: 3.11
pytorch-version: 2.2
exclude:
- python-version: 3.8
pytorch-version: 1.7.1
- python-version: 3.9
pytorch-version: 1.4.0
- python-version: 3.9
pytorch-version: 1.5.1
- python-version: 3.9
pytorch-version: 1.6.0
- python-version: 3.9
pytorch-version: 1.7.1
- python-version: 3.9
pytorch-version: 1.8
- python-version: 3.10
pytorch-version: 1.4.0
- python-version: 3.10
pytorch-version: 1.5.1
- python-version: 3.10
pytorch-version: 1.6.0
- python-version: 3.10
pytorch-version: 1.7.1
- python-version: 3.10
pytorch-version: 1.8
- python-version: 3.10
pytorch-version: 1.6.0
- python-version: 3.10
pytorch-version: 1.9
- python-version: 3.10
pytorch-version: 1.10
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade uv
uv pip install --system pytest pytest-cov
uv pip install --system torch==${{ matrix.pytorch-version }} torchvision transformers
- name: mypy
if: ${{ matrix.pytorch-version == '2.2' }}
run: |
uv pip install --system mypy==1.9.0
mypy --install-types --non-interactive .
- name: pytest
if: ${{ matrix.pytorch-version == '2.2' }}
run: |
pytest --cov=torchinfo --cov-report= --durations=0
- name: pytest
if: ${{ matrix.pytorch-version != '2.2' }}
run: |
pytest --no-output -k "not test_eval_order_doesnt_matter and not test_google and not test_uninitialized_tensor and not test_input_size_half_precision and not test_recursive_with_missing_layers and not test_flan_t5_small"
- name: codecov
uses: codecov/codecov-action@v1