-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
4 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,46 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release-win: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
with: # Latest Windows 7 compatible binary release from python.org | ||
python-version: "3.8.10" | ||
architecture: x86 | ||
- run: python -m unittest -v | ||
- name: Install packaging dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pyinstaller | ||
- run: .\build.bat | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: "dist/*" | ||
# draft: true | ||
fail_on_unmatched_files: true | ||
release-mac: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- run: python -m unittest -v | ||
- name: Install packaging dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pyinstaller | ||
- run: ./build_osx.sh | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: "dist/*" | ||
# draft: true | ||
fail_on_unmatched_files: true |
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,26 @@ | ||
name: Unittests | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
unittest: | ||
|
||
runs-on: ubuntu-20.04 # Versions =< 3.8.11 not awailable for ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8.10", "3"] # 3.8.10 for Windows 7 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: python -m unittest -v |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#!/usr/bin/env python | ||
|
||
import doctest | ||
import unittest | ||
|
||
from heval import abg, drugs, electrolytes, human, nutrition | ||
|
||
DOCTESTS = (abg, drugs, electrolytes, human, nutrition) | ||
modules = (abg, drugs, electrolytes, human, nutrition) | ||
|
||
|
||
def load_tests(loader, tests, ignore): | ||
tests.addTests([doctest.DocTestSuite(t) for t in DOCTESTS]) | ||
def load_tests(loader: unittest.TestLoader, tests, pattern) -> unittest.TestSuite: | ||
"""Callback to load doctests from modules.""" | ||
tests.addTests([doctest.DocTestSuite(m) for m in modules]) | ||
return tests |