diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..42cd6ad --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: test + +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: [3.8, 3.9] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + pip3 install --upgrade setuptools + pip3 install .[dev] + + - name: Run tests + run: | + ss-manager -h + pytest -v + shell: bash diff --git a/setup.cfg b/setup.cfg index ba20a55..ebeb452 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,6 +18,7 @@ dev = isort black mypy + pytest [flake8] max-line-length = 100 diff --git a/tests/test_hello.py b/tests/test_hello.py new file mode 100644 index 0000000..bf8cc89 --- /dev/null +++ b/tests/test_hello.py @@ -0,0 +1,9 @@ +import pytest + + +def hello(): + return "Hello, world!" + + +def test_hello(): + assert hello() == "Hello, world!"