Skip to content

Commit

Permalink
Merge pull request #371 from openego/338-add-github-actions
Browse files Browse the repository at this point in the history
Add github actions for testing and coverage
  • Loading branch information
mltja authored Mar 13, 2023
2 parents 90d87f0 + 3c5de0e commit f98aa79
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/tests-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Tests with pytest the package and monitors the covarage and sends it to coveralls.io
# Coverage is only send to coveralls.io when no pytest tests fail
name: "Tests & coverage"

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.6', '3.7', '3.8' ]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install -e $GITHUB_WORKSPACE[dev]
pip3 install coveralls
- name: Run tests and coverage
run: |
coverage run --source=ding0 -m pytest -vv
- name: Run coveralls
run: |
coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<img align="right" width="300" height="300" src="https://raw.githubusercontent.com/openego/ding0/dev/doc/images/DING0_Logo_300px.png">


[![Coverage Status](https://coveralls.io/repos/github/openego/ding0/badge.svg?branch=dev)](https://coveralls.io/github/openego/ding0?branch=dev)
[![Tests & coverage](https://github.com/openego/ding0/actions/workflows/tests-coverage.yml/badge.svg)](https://github.com/openego/ding0/actions/workflows/tests-coverage.yml)
[![Documentation Status](https://readthedocs.org/projects/ding0/badge/?version=dev)](http://dingo.readthedocs.io/en/dev)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.834751.svg)](https://doi.org/10.5281/zenodo.834751)
[![Build Status](https://travis-ci.org/openego/ding0.svg?branch=dev)](https://travis-ci.org/openego/ding0)

DING0
=====
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
networkx == 2.5.1
geopy == 2.1.0
pandas == 1.2.4
pandas <= 1.2.4
pyproj == 3.0.1
sqlalchemy <= 1.3.24
geoalchemy2 == 0.6.3
Expand Down

0 comments on commit f98aa79

Please sign in to comment.