-
Notifications
You must be signed in to change notification settings - Fork 85
48 lines (43 loc) · 1.18 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
name: Unit Tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
testmnist:
name: Train mnist
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Dependencies
run: pip install numpy tqdm
- name: Train MNIST
run: PYTHONPATH="." python mnist.py
tests:
name: Run tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install deps with testing deps
run: pip install numpy tqdm mypy torch pytest tabulate hypothesis --extra-index-url https://download.pytorch.org/whl/cpu
- name: Test ops dtype optim
run: |
PYTHONPATH="." python test/test_ops.py
PYTHONPATH="." python test/test_dtype.py
PYTHONPATH="." python test/test_optim.py
- name: Check types with mypy
run: mypy
- name: Get code size
run: PYTHONPATH="." python sz.py