Skip to content

Commit

Permalink
Sets up automated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gfrn committed Jul 28, 2022
1 parent 6a8dbdb commit a272809
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bandit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bandit]
exclude: /test
exclude: /tests
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
- name: Unit tests
run: python -m pytest tests/unit/
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ dev = [
"mypy==0.812",
"mypy-extensions==0.4.3",
"pyflakes==2.3.1",
"types-setuptools"
"types-setuptools",
"pytest==7.1.2"
]
2 changes: 0 additions & 2 deletions tests/unit/test_validation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import unittest
from unittest.mock import MagicMock, patch
from pydrs import EthDRS
from pydrs.validation import (
SerialErrCheckSum,
SerialErrPckgLen,
Expand Down

0 comments on commit a272809

Please sign in to comment.