Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Unittests on GHA #178

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: unittests
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]

push:
branches:
- development
- master

jobs:
unittests:
timeout-minutes: 10
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ '3.5', '3.6', '3.7', '3.8', '3.9' ]

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies ${{ matrix.python-version }}
run: |
REQS="-r requirements.txt -r test-requirements.txt"
pip install --upgrade --upgrade-strategy eager ${REQS}

- name: Run tests
run: |
python -m pytest -vv
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ https://api.wattsight.com/ (or equivalent services). Note that access
is based on some sort of login credentials, this library is not all
that useful unless you have a valid Wattsight account.

The library is tested against both Python 2.7 and Python 3.6,
we recommend using Python 3.
The library is tested against both Python version >=3.5 and <=3.9


## Documentation
Expand Down
Loading