Skip to content

Commit

Permalink
Merge pull request #52 from ronawho/github-actions
Browse files Browse the repository at this point in the history
Migrate our sphinx domain to github actions

[reviewed by @lydia-duncan]

Migrate from Travis to Github Actions. Travis is no longer free (or well
supported), so migrate to github actions. For the most part this is a
direct transliteration of the Travis job, but the main coveralls
github-action doesn't work with xml (coverallsapp/github-action#30), so
switch to using codecov, which provides similar functionality.

Here's some resources I used:
- https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
- https://github.com/codecov/codecov-action

Resolves Cray/chapel-private#1804
  • Loading branch information
ronawho authored Mar 24, 2022
2 parents f804ba4 + 20dfc35 commit 7be5c5b
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 20 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt -r test-requirements.txt -r docs-requirements.txt
- name: Lint
run: flake8 sphinxcontrib/
- name: Test
run: nosetests --verbose --with-cov --cov-report xml --cover-package=sphinxcontrib.chapeldomain
- name: Make docs
run: |
( export PYTHONPATH=`pwd` && cd docs/ && make html )
( export PYTHONPATH=`pwd` && cd doc-test/ && make html )
- name: Codecode
uses: codecov/codecov-action@v2
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Chapel_ domain for Sphinx_.
.. _Chapel: http://chapel-lang.org/
.. _Sphinx: http://sphinx-doc.org/

.. image:: https://travis-ci.org/chapel-lang/sphinxcontrib-chapeldomain.svg?branch=master
:target: https://travis-ci.org/chapel-lang/sphinxcontrib-chapeldomain
.. image:: https://github.com/chapel-lang/sphinxcontrib-chapeldomain/actions/workflows/CI.yml/badge.svg
:target: https://github.com/chapel-lang/sphinxcontrib-chapeldomain/actions/workflows/CI.yml

.. image:: https://coveralls.io/repos/chapel-lang/sphinxcontrib-chapeldomain/badge.svg?branch=master
:target: https://coveralls.io/r/chapel-lang/sphinxcontrib-chapeldomain?branch=master
.. image:: https://codecov.io/gh/chapel-lang/sphinxcontrib-chapeldomain/branch/master/graph/badge.svg
:target: https://codecov.io/gh/chapel-lang/sphinxcontrib-chapeldomain

`Package documentation`_ is available on readthedocs.org.

Expand Down
6 changes: 3 additions & 3 deletions docs/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Overview
Testing
-------

Travis_ runs the tests automically and records code coverage in Coveralls_. On
`Github Actions`_ runs the tests automically and records code coverage in Codecov_. On
a local workstation, tox_ can be used to run the tests in a similar fashion.

.. code-block:: bash
Expand All @@ -38,8 +38,8 @@ a local workstation, tox_ can be used to run the tests in a similar fashion.
tox -e docs # verify the docs build
tox -e doc-test # verify the acceptance tests build
.. _Travis: https://travis-ci.org/chapel-lang/sphinxcontrib-chapeldomain
.. _Coveralls: https://coveralls.io/r/chapel-lang/sphinxcontrib-chapeldomain?branch=master
.. _Github Actions: https://github.com/chapel-lang/sphinxcontrib-chapeldomain/actions/workflows/CI.yml
.. _Codecov: https://codecov.io/gh/chapel-lang/sphinxcontrib-chapeldomain
.. _tox: https://tox.readthedocs.org/en/latest/

Release
Expand Down
1 change: 0 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
coveralls
flake8
mock
nose
Expand Down

0 comments on commit 7be5c5b

Please sign in to comment.