Skip to content

Commit 60682d4

Browse files
committed
Migrate from Travis to GitHub actions
Travis.org is no longer building. The Jython setup has had to be modified as pip does not work in the current version of Jython see: jython/jython#97 In addition pytest has been updated to version 4 requiring changes to parameterised tests.
1 parent 3b0a59e commit 60682d4

File tree

5 files changed

+91
-30
lines changed

5 files changed

+91
-30
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Diffcalc build
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
flavour: ['python', 'jython']
13+
python-version: [2.7]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
if: matrix.flavour == 'python'
22+
23+
- name: Install Python packages
24+
run: |
25+
pip install pytest==4.6.11; pip install pytest-xdist==1.26.1; pip install scipy==1.0.0; pip install nose==1.3.7
26+
echo "PYTEST=pytest -W ignore::PendingDeprecationWarning" >> $GITHUB_ENV
27+
if: matrix.flavour == 'python'
28+
29+
- name: Install Jython
30+
run: |
31+
source install-jython-environment.sh
32+
echo "PYTEST=$HOME/jython/bin/jython -m pytest" >> $GITHUB_ENV
33+
echo "CLASSPATH=$PWD/jama-1.0.3.jar:$PWD/commons-math3-3.6.1.jar" >> $GITHUB_ENV
34+
if: matrix.flavour == 'jython'
35+
36+
- name: Tests
37+
run: |
38+
echo Running $PYTEST
39+
$PYTEST

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ same task as the fourc, sixc, twoc, kappa, psic and surf macros from SPEC.
77

88
There is a `user guide <https://diffcalc.readthedocs.io/en/latest/youmanual.html>`_ and `developer guide <https://diffcalc.readthedocs.io/en/latest/developer/contents.html>`_, both at `diffcalc.readthedocs.io <https://diffcalc.readthedocs.io>`_
99

10-
|Travis| |Read the docs|
10+
|GH Actions| |Read the docs|
1111

12-
.. |Travis| image:: https://travis-ci.org/DiamondLightSource/diffcalc.svg?branch=master
13-
:target: https://travis-ci.org/DiamondLightSource/diffcalc
12+
.. |GH Actions| image:: https://github.com/DiamondLightSource/diffcalc/actions/workflows/main.yml/badge.svg?branch=master
13+
:target: https://github.com/DiamondLightSource/diffcalc/actions
1414
:alt: Build Status
1515

1616
.. |Read the docs| image:: https://readthedocs.org/projects/diffcalc/badge/?version=latest

README_template.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ same task as the fourc, sixc, twoc, kappa, psic and surf macros from SPEC.
77

88
There is a `user guide <https://diffcalc.readthedocs.io/en/latest/youmanual.html>`_ and `developer guide <https://diffcalc.readthedocs.io/en/latest/developer/contents.html>`_, both at `diffcalc.readthedocs.io <https://diffcalc.readthedocs.io>`_
99

10-
|Travis| |Read the docs|
10+
|GH Actions| |Read the docs|
1111

12-
.. |Travis| image:: https://travis-ci.org/DiamondLightSource/diffcalc.svg?branch=master
13-
:target: https://travis-ci.org/DiamondLightSource/diffcalc
12+
.. |GH Actions| image:: https://github.com/DiamondLightSource/diffcalc/actions/workflows/main.yml/badge.svg?branch=master
13+
:target: https://github.com/DiamondLightSource/diffcalc/actions
1414
:alt: Build Status
1515

1616
.. |Read the docs| image:: https://readthedocs.org/projects/diffcalc/badge/?version=latest

install-jython-environment.sh

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,49 @@ java -jar jython_installer.jar -s -d $HOME/jython
1515

1616
# Install nose for Jython
1717
# TODO: move to a setup.py
18-
$HOME/jython/bin/pip install nose
19-
$HOME/jython/bin/pip install pytest==3.10.1
20-
$HOME/jython/bin/pip install pytest-xdist==1.26.1
18+
#$HOME/jython/bin/pip install nose==1.3.7
19+
#$HOME/jython/bin/pip install pytest==3.10.1
20+
#$HOME/jython/bin/pip install pytest-xdist==1.26.1
21+
22+
23+
# Download dependencies directly from Pypi
24+
# as pip is currently broken (https://github.com/jython/jython/issues/97)
25+
26+
27+
wget https://files.pythonhosted.org/packages/02/ee/b6e02dc6529e82b75bb06823ff7d005b141037cb1416b10c6f00fc419dca/Pygments-2.2.0-py2.py3-none-any.whl
28+
wget https://files.pythonhosted.org/packages/a1/4e/c42167ba5c3192bed633726d39d7896cc55d4fa3ec4a1fb60cd3a53fc4c7/decorator-4.1.2-py2.py3-none-any.whl
29+
wget https://files.pythonhosted.org/packages/70/c7/e8cb4a537ee4fc497ac80a606a667fd1832f28ad3ddbfa25bf30473eae13/pytest-4.6.11-py2.py3-none-any.whl
30+
wget https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
31+
wget https://files.pythonhosted.org/packages/2c/a0/da5f49008ec6e9a658dbf5d7310a4debd397bce0b4db03cf8a410066bb87/atomicwrites-1.4.0-py2.py3-none-any.whl
32+
wget https://files.pythonhosted.org/packages/f6/f0/10642828a8dfb741e5f3fbaac830550a518a775c7fff6f04a007259b0548/py-1.11.0-py2.py3-none-any.whl
33+
wget https://files.pythonhosted.org/packages/be/be/7abce643bfdf8ca01c48afa2ddf8308c2308b0c3b239a44e57d020afa0ef/attrs-21.4.0-py2.py3-none-any.whl
34+
wget https://files.pythonhosted.org/packages/a0/28/85c7aa31b80d150b772fbe4a229487bc6644da9ccb7e427dd8cc60cb8a62/pluggy-0.13.1-py2.py3-none-any.whl
35+
wget https://files.pythonhosted.org/packages/c1/f9/9058661f6b4bb017dfe17ef84b461e4b11130c7bbee1b35cc0883ec8533b/importlib_metadata-2.1.2-py2.py3-none-any.whl
36+
wget https://files.pythonhosted.org/packages/96/0a/67556e9b7782df7118c1f49bdc494da5e5e429c93aa77965f33e81287c8c/zipp-1.2.0-py2.py3-none-any.whl
37+
wget https://files.pythonhosted.org/packages/cf/e5/989798d38831a8505d62687c94b0f2954ff0a40782e25f9add8ed675dc1f/contextlib2-0.6.0-py2.py3-none-any.whl
38+
wget https://files.pythonhosted.org/packages/7a/2a/95ed0501cf5d8709490b1d3a3f9b5cf340da6c433f896bbe9ce08dbe6785/configparser-4.0.2-py2.py3-none-any.whl
39+
wget https://files.pythonhosted.org/packages/76/67/dc02c72177ec79f0176e5bf9921e9c1745a381ed556afb3b3ecc2bb8ba2e/pathlib2-2.3.6-py2.py3-none-any.whl
40+
wget https://files.pythonhosted.org/packages/f9/d0/6b7b38eaf9964510f5c32aa5aaf9f419864d2e0ebe34274e6cba5689a0c5/scandir-1.10.0-cp27-cp27m-win_amd64.whl
41+
wget https://files.pythonhosted.org/packages/3e/89/7ea760b4daa42653ece2380531c90f64788d979110a2ab51049d92f408af/packaging-20.9-py2.py3-none-any.whl
42+
wget https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
43+
wget https://files.pythonhosted.org/packages/a4/a6/42f17d065bda1fac255db13afc94c93dbfb64393eae37c749b4cb0752fc7/more_itertools-5.0.0-py3-none-any.whl
44+
wget https://files.pythonhosted.org/packages/99/4f/13fb671119e65c4dce97c60e67d3fd9e6f7f809f2b307e2611f4701205cb/nose-1.3.7-py2-none-any.whl
45+
46+
unzip -d $HOME/jython/Lib/site-packages Pygments-2.2.0-py2.py3-none-any.whl
47+
unzip -d $HOME/jython/Lib/site-packages decorator-4.1.2-py2.py3-none-any.whl
48+
unzip -d $HOME/jython/Lib/site-packages pytest-4.6.11-py2.py3-none-any.whl
49+
unzip -d $HOME/jython/Lib/site-packages six-1.16.0-py2.py3-none-any.whl
50+
unzip -d $HOME/jython/Lib/site-packages atomicwrites-1.4.0-py2.py3-none-any.whl
51+
unzip -d $HOME/jython/Lib/site-packages py-1.11.0-py2.py3-none-any.whl
52+
unzip -d $HOME/jython/Lib/site-packages attrs-21.4.0-py2.py3-none-any.whl
53+
unzip -d $HOME/jython/Lib/site-packages pluggy-0.13.1-py2.py3-none-any.whl
54+
unzip -d $HOME/jython/Lib/site-packages importlib_metadata-2.1.2-py2.py3-none-any.whl
55+
unzip -d $HOME/jython/Lib/site-packages zipp-1.2.0-py2.py3-none-any.whl
56+
unzip -d $HOME/jython/Lib/site-packages contextlib2-0.6.0-py2.py3-none-any.whl
57+
unzip -d $HOME/jython/Lib/site-packages configparser-4.0.2-py2.py3-none-any.whl
58+
unzip -d $HOME/jython/Lib/site-packages pathlib2-2.3.6-py2.py3-none-any.whl
59+
unzip -d $HOME/jython/Lib/site-packages scandir-1.10.0-cp27-cp27m-win_amd64.whl
60+
unzip -d $HOME/jython/Lib/site-packages packaging-20.9-py2.py3-none-any.whl
61+
unzip -d $HOME/jython/Lib/site-packages funcsigs-1.0.2-py2.py3-none-any.whl
62+
unzip -d $HOME/jython/Lib/site-packages more_itertools-5.0.0-py3-none-any.whl
63+
unzip -d $HOME/jython/Lib/site-packages nose-1.3.7-py2-none-any.whl

0 commit comments

Comments
 (0)