Skip to content

Commit 1026234

Browse files
committed
Test all torch versions
1 parent 17b6e0d commit 1026234

File tree

1 file changed

+219
-0
lines changed

1 file changed

+219
-0
lines changed
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
name: Version specific tests
2+
3+
on:
4+
push:
5+
branches:
6+
- version_ci_*
7+
schedule:
8+
- cron: "0 0 * * *"
9+
10+
jobs:
11+
run_tests_torch-1_3:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v1
16+
17+
- name: Install Python
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.6
21+
22+
- name: Loading cache.
23+
uses: actions/cache@v2
24+
id: cache
25+
with:
26+
path: ~/.cache/pip
27+
key: v1.2-torch-1_3
28+
restore-keys: |
29+
v1.2-torch-1_3-${{ hashFiles('setup.py') }}
30+
v1.2-torch-1_3
31+
32+
- name: Install dependencies
33+
run: |
34+
pip install --upgrade pip
35+
pip install .[dev]
36+
pip install -U torch==1.3
37+
38+
- name: Run all non-slow tests
39+
run: |
40+
python -m pytest -n 1 --dist=loadfile -s --make-reports=tests_torch-1_3 tests/*template*
41+
42+
- name: Failure short reports
43+
if: ${{ always() }}
44+
run: cat reports/tests_torch-1_3_failures_short.txt
45+
46+
- name: Test suite reports artifacts
47+
if: ${{ always() }}
48+
uses: actions/upload-artifact@v2
49+
with:
50+
name: run_all_tests_torch-1_3_test_reports
51+
path: reports
52+
53+
run_tests_torch-1_4:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v1
58+
59+
- name: Install Python
60+
uses: actions/setup-python@v1
61+
with:
62+
python-version: 3.6
63+
64+
- name: Loading cache.
65+
uses: actions/cache@v2
66+
id: cache
67+
with:
68+
path: ~/.cache/pip
69+
key: v1.2-torch-1_4
70+
restore-keys: |
71+
v1.2-torch-1_4-${{ hashFiles('setup.py') }}
72+
v1.2-torch-1_4
73+
74+
- name: Install dependencies
75+
run: |
76+
pip install --upgrade pip
77+
pip install .[dev]
78+
pip install -U torch==1.4
79+
80+
- name: Run all non-slow tests
81+
run: |
82+
python -m pytest -n 1 --dist=loadfile -s --make-reports=tests_torch-1_4 tests/*template*
83+
84+
- name: Failure short reports
85+
if: ${{ always() }}
86+
run: cat reports/tests_torch-1_4_failures_short.txt
87+
88+
- name: Test suite reports artifacts
89+
if: ${{ always() }}
90+
uses: actions/upload-artifact@v2
91+
with:
92+
name: run_all_tests_torch-1_4_test_reports
93+
path: reports
94+
95+
run_tests_torch-1_5:
96+
runs-on: ubuntu-latest
97+
steps:
98+
- name: Checkout repository
99+
uses: actions/checkout@v1
100+
101+
- name: Install Python
102+
uses: actions/setup-python@v1
103+
with:
104+
python-version: 3.6
105+
106+
- name: Loading cache.
107+
uses: actions/cache@v2
108+
id: cache
109+
with:
110+
path: ~/.cache/pip
111+
key: v1.2-torch-1_5
112+
restore-keys: |
113+
v1.2-torch-1_5-${{ hashFiles('setup.py') }}
114+
v1.2-torch-1_5
115+
116+
- name: Install dependencies
117+
run: |
118+
pip install --upgrade pip
119+
pip install .[dev]
120+
pip install -U torch==1.5
121+
122+
- name: Run all non-slow tests
123+
run: |
124+
python -m pytest -n 1 --dist=loadfile -s --make-reports=tests_torch-1_5 tests/*template*
125+
126+
- name: Failure short reports
127+
if: ${{ always() }}
128+
run: cat reports/tests_torch-1_5_failures_short.txt
129+
130+
- name: Test suite reports artifacts
131+
if: ${{ always() }}
132+
uses: actions/upload-artifact@v2
133+
with:
134+
name: run_all_tests_torch-1_5_test_reports
135+
path: reports
136+
137+
run_tests_torch-1_6:
138+
runs-on: ubuntu-latest
139+
steps:
140+
- name: Checkout repository
141+
uses: actions/checkout@v1
142+
143+
- name: Install Python
144+
uses: actions/setup-python@v1
145+
with:
146+
python-version: 3.6
147+
148+
- name: Loading cache.
149+
uses: actions/cache@v2
150+
id: cache
151+
with:
152+
path: ~/.cache/pip
153+
key: v1.2-torch-1_6
154+
restore-keys: |
155+
v1.2-torch-1_6-${{ hashFiles('setup.py') }}
156+
v1.2-torch-1_6
157+
158+
- name: Install dependencies
159+
run: |
160+
pip install --upgrade pip
161+
pip install .[dev]
162+
pip install -U torch==1.6
163+
164+
- name: Run all non-slow tests
165+
run: |
166+
python -m pytest -n 1 --dist=loadfile -s --make-reports=tests_torch-1_6 tests/*template*
167+
168+
- name: Failure short reports
169+
if: ${{ always() }}
170+
run: cat reports/tests_torch-1_6_failures_short.txt
171+
172+
- name: Test suite reports artifacts
173+
if: ${{ always() }}
174+
uses: actions/upload-artifact@v2
175+
with:
176+
name: run_all_tests_torch-1_6_test_reports
177+
path: reports
178+
179+
run_tests_torch-1_7:
180+
runs-on: ubuntu-latest
181+
steps:
182+
- name: Checkout repository
183+
uses: actions/checkout@v1
184+
185+
- name: Install Python
186+
uses: actions/setup-python@v1
187+
with:
188+
python-version: 3.6
189+
190+
- name: Loading cache.
191+
uses: actions/cache@v2
192+
id: cache
193+
with:
194+
path: ~/.cache/pip
195+
key: v1.2-torch-1_7
196+
restore-keys: |
197+
v1.2-torch-1_7-${{ hashFiles('setup.py') }}
198+
v1.2-torch-1_7
199+
200+
- name: Install dependencies
201+
run: |
202+
pip install --upgrade pip
203+
pip install .[dev]
204+
pip install -U torch==1.7
205+
206+
- name: Run all non-slow tests
207+
run: |
208+
python -m pytest -n 1 --dist=loadfile -s --make-reports=tests_torch-1_7 tests/*template*
209+
210+
- name: Failure short reports
211+
if: ${{ always() }}
212+
run: cat reports/tests_torch-1_7_failures_short.txt
213+
214+
- name: Test suite reports artifacts
215+
if: ${{ always() }}
216+
uses: actions/upload-artifact@v2
217+
with:
218+
name: run_all_tests_torch-1_7_test_reports
219+
path: reports

0 commit comments

Comments
 (0)