Skip to content

Commit

Permalink
Add github CI (#87)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
szagoruyko and Sergey Zagoruyko authored Dec 30, 2024
1 parent 0adcd83 commit 5cf04c1
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI for torchviz

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y graphviz
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install .
pip install pytest
- name: Run tests
run: |
pytest test/test.py

0 comments on commit 5cf04c1

Please sign in to comment.