Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zyr17 committed Aug 22, 2023
1 parent e7b6ae8 commit 47d3667
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: pytest

on:
- push
- pull_request
- workflow_dispatch

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests with coverage
run: |
python -m pytest --cov --cov-report=html
tar czf htmlcov.tar.gz htmlcov/
- name: Upload coverage report
uses: actions/upload-artifact@v2
with:
name: htmlcov
path: htmlcov.tar.gz
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
numpy==1.24.3
pydantic==1.10.8
typing_extensions==4.6.2
pytest==7.4.0
pytest-cov==4.1.0

0 comments on commit 47d3667

Please sign in to comment.