Skip to content

Commit

Permalink
actions for pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
ilsenatorov committed Aug 16, 2024
1 parent 9b7041f commit 697926b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 9 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/run_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Run Unit Test via Pytest

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
coverage run -m pytest -v -s
- name: Generate Coverage Report
run: |
coverage report -m
12 changes: 5 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
.idea/
.*
!.gitignore
!.pre-commit-config.yaml
!.github/
__*__
*.egg-info
*.pyc
*.txt
*.fasta
data/*
*.csv
.ipynb_checkpoints/
*.out
*.ipynb
*.html
*.csv
*.json
data/
wandb/
lightning_logs/
output
*.out
*.egg-info
2 changes: 1 addition & 1 deletion smtb/tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
import torch

from smtb.model import RegressionModel
from ..model import RegressionModel


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion smtb/tests/test_pooling.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
import torch

from smtb.model import poolings
from ..model import poolings


@pytest.fixture
Expand Down

0 comments on commit 697926b

Please sign in to comment.