Skip to content

Commit

Permalink
unit test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
etalbert102 committed May 15, 2024
1 parent 94819b1 commit 03b0588
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Unit Tests

on:
push:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Lint with pylint
run: |
pylint --fail-under=9.0 geochron
- name: Pytest
run: |
coverage run --source geochron/ -m pytest && coverage report -m --fail-under 99
- name: MyPy
run: |
mypy geochron --ignore-missing-imports
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Geotime does not require any of the below dependencies to function, however some
* networkx (chron-nets)

### Overview
[![Unit Tests](https://github.com/etalbert102/geochron/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/etalbert102/geochron/actions/workflows/unit-tests.yml)

Geotime enables various ways of displaying and structuring geo-spatial-temporal data

Expand Down
1 change: 1 addition & 0 deletions geochron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{
'networkx': 'networkx>=3.0,<4.0',
'plotly': 'plotly>=5,<6',
'timehash': 'timehash>=1.2,<2',
}
)
sys.meta_path.append(ConditionalPackageInterceptor) # type: ignore
Expand Down

0 comments on commit 03b0588

Please sign in to comment.