Skip to content

Commit

Permalink
Update autotest workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMoroz committed Sep 3, 2024
1 parent 1ab0a1d commit 88ca104
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 32 deletions.
52 changes: 25 additions & 27 deletions .github/workflows/autotests.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
name: Run Python Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install tensorfrost from TestPyPI
run: |
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ tensorfrost
- name: Make test script executable
run: chmod +x run_tests.sh

- name: Run tests
run: ./run_tests.sh
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install PyTorch
run: |
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
- name: Install tensorfrost from TestPyPI
run: |
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ tensorfrost
- name: Make test script executable
run: chmod +x run_tests.sh

- name: Run tests
run: ./run_tests.sh
Empty file removed tests/__init__.py
Empty file.
3 changes: 0 additions & 3 deletions tests/autograd_test.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import TensorFrost as tf
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import time
from tqdm import tqdm
import unittest

tf.initialize(tf.opengl)
Expand Down
1 change: 0 additions & 1 deletion tests/sorting_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# %%
import numpy as np
import TensorFrost as tf
import matplotlib.pyplot as plt
import unittest

tf.initialize(tf.opengl)
Expand Down
1 change: 0 additions & 1 deletion tests/split_dim_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import numpy as np
import TensorFrost as tf
import matplotlib.pyplot as plt
import unittest

tf.initialize(tf.cpu)
Expand Down

0 comments on commit 88ca104

Please sign in to comment.