Skip to content

Commit 5cf04c1

Browse files
szagoruykoSergey Zagoruyko
andauthored
Add github CI (#87)
* add ci * Update ci.yml * fix 3.1 issue * specify test file * install cpu only torch for tests * add python 3.12 to ci * switch to master branch --------- Co-authored-by: Sergey Zagoruyko <[email protected]>
1 parent 0adcd83 commit 5cf04c1

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI for torchviz
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
name: Test on Python ${{ matrix.python-version }}
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install system dependencies
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y graphviz
33+
34+
- name: Install Python dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install torch --index-url https://download.pytorch.org/whl/cpu
38+
pip install .
39+
pip install pytest
40+
41+
- name: Run tests
42+
run: |
43+
pytest test/test.py

0 commit comments

Comments
 (0)