Skip to content

Commit

Permalink
Create github actions (#200)
Browse files Browse the repository at this point in the history
* Renaming github workflows.

* Adding basic workflow.

* Modifying workflow.

* Adding tests to github actions.

* Removing the Travis CI script.

* Modifying workflow based on code review.

* Adding code coverage.

* Testing code coverage with github actions.

* Testing code coverage with github actions.

* Adding the full set of jobs for github action workflows.

* Making changes due to code review.
  • Loading branch information
kmacdonald-stsci authored Jan 12, 2021
1 parent a2e266b commit 52f3b6f
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 75 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/blank.yml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/spherical_geometry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Spherical Geometry CI

# Change 'on' section and add code coverage.

on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:

jobs:
build:
name: Python Testing ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test]
- name: Test with pytest
run: |
pytest
doc_build:
name: Document Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get install graphviz texlive-latex-extra dvipng
python -m pip install --upgrade pip
python -m pip install -e .[docs]
- name: Build documents with sphinx
run: |
sphinx-build docs build/docs
code_coverage:
name: Code Coverage Report
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test]
- name: Test with pytest and code coverage
run: |
pytest --cov-report=xml --cov=. --cov-config=setup.cfg
- name: Upload coverage to codecoverage
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ project_urls =
Bug Reports = https://github.com/spacetelescope/spherical_geometry/issues/
Source = https://github.com/spacetelescope/spherical_geometry/
Help = https://hsthelp.stsci.edu

[coverage:run]
omit =
spherical_geometry/tests/*
# And list again for running against installed versions
*/spherical_geometry/tests/*

1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def qd_config(arg):
extras_require={
'test': [
'pytest',
'pytest-cov',
],
'docs': [
'sphinx',
Expand Down

0 comments on commit 52f3b6f

Please sign in to comment.