-
Notifications
You must be signed in to change notification settings - Fork 39
71 lines (67 loc) · 2.71 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: tests
#Running tests on all branches
on: [push,pull_request]
jobs:
# This is a job for linux python3 tests
linuxpy3:
runs-on: [ubuntu-18.04]
container:
image: 'rootproject/root:latest'
steps:
- uses: actions/checkout@v2
- name: Test with pytest
run: |
yum install -y python-pip ghostscript
python -m pip install pytest_pylint configparser astroid pyyml papermill
python setup.py test
python -m pylint hepdata_lib/*.py
python -m pylint tests/*.py --rcfile=tests/pylintrc
# This is a job for macOS python3 tests
macospy3:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Test with pytest
run: |
brew update
brew cask uninstall --force oclint
brew upgrade python cmake libpng libtiff
brew install --force ossp-uuid davix fftw fontconfig gd graphviz gsl lz4 tbb xrootd
curl -O https://clange.web.cern.ch/clange/root-v6.18.00.tar.gz
tar xzf root-v6.18.00.tar.gz
mkdir -p /usr/local/Cellar/root
mv 6.18.00 /usr/local/Cellar/root/
cd /usr/local/Cellar/root/6.18.00
export PATH=${PWD}/bin:${PATH}
export PYTHONPATH=${PWD}/lib/root:${PYTHONPATH}
export LD_LIBRARY_PATH=${PWD}/lib/root:${LD_LIBRARY_PATH}
echo ${PYTHONPATH}
cd -
python3 setup.py test
python3 -m pip install -e .
python3 -m pip install papermill
python3 -m pylint hepdata_lib/*.py
python3 -m pylint tests/*.py --rcfile=tests/pylintrc
# This is a job for linux python2.7 tests
linuxpy27:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: Test with pytest
run: |
sudo apt-get install python2.7
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
curl -O https://root.cern.ch/download/root_v6.20.00.Linux-ubuntu16-x86_64-gcc5.4.tar.gz
tar xzf root_v6.20.00.Linux-ubuntu16-x86_64-gcc5.4.tar.gz
python -m pip install numpy==1.16.5
sudo sed -i '/MVG/d' /etc/ImageMagick-6/policy.xml
sudo sed -i '/PDF/{s/none/read|write/g}' /etc/ImageMagick-6/policy.xml
sudo sed -i '/PDF/ a <policy domain="coder" rights="read|write" pattern="LABEL" />' /etc/ImageMagick-6/policy.xml
python -m pip install --upgrade enum34 pytest_pylint configparser astroid future ipykernel papermill
sudo apt update
sudo apt install -y ghostscript
source root/bin/thisroot.sh
python setup.py test
python -m pylint hepdata_lib/*.py
python -m pylint tests/*.py --rcfile=tests/pylintrc