Merge pull request #31 from klae01/feature/pytest

add basic test
This commit is contained in:
Shuming Ma 2023-06-04 02:01:29 +08:00 committed by GitHub
commit 859c4c6bcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

26
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Python package
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f setup.py ]; then pip install .; fi
- name: Install pytest
run: |
pip install pytest
- name: Run tests
run: |
pytest tests/