-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from monarch-initiative/issue_13
Add GH action for pytest
- Loading branch information
Showing
5 changed files
with
177 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Built from: | ||
# https://docs.github.com/en/actions/guides/building-and-testing-python | ||
# https://github.com/snok/install-poetry#workflows-and-tips | ||
|
||
name: Build and test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
# lint: | ||
# runs-on: ubuntu-latest | ||
# continue-on-error: true # This line allows the job to continue even if errors occur | ||
# strategy: | ||
# matrix: | ||
# python-version: [ '3.9', '3.10' ] | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Set up Python ${{ matrix.python-version }} | ||
# uses: actions/setup-python@v4.3.0 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# - name: Install dependencies | ||
# run: | | ||
# pip install tox | ||
# - name: Check code quality with flake8 | ||
# run: tox -e flake8 | ||
|
||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest ] | ||
python-version: [ "3.10" ] | ||
exclude: | ||
- os: windows-latest | ||
python-version: "3.10" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1.3.1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Install dependencies | ||
run: poetry install --no-interaction --no-root | ||
- name: Run Doctests | ||
run: poetry run tox -e doctest | ||
- name: Generate coverage results | ||
run: | | ||
poetry run pip install -U pytest | ||
poetry run coverage run -p -m pytest tests/ | ||
poetry run coverage combine | ||
poetry run coverage xml | ||
poetry run coverage report -m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ data/* | |
prompts/* | ||
inputdir | ||
outputdir | ||
.openai_cache.db |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters