blob: eaa02bc9ffc88f2204bf403cd665db62afb16c3c [file] [log] [blame]
Marc Kupietz01f41602020-06-19 20:06:31 +02001name: PythonKorAPClient CI unit test
2
3on: [push, pull_request]
4
5jobs:
6 build:
7
8 runs-on: ${{ matrix.os }}
9 strategy:
10 max-parallel: 4
11 matrix:
12 python-version: [3.5, 3.6, 3.7, 3.8]
13 r-version: [3.6, 4.0]
14 os: [macOS-latest, ubuntu-latest, windows-latest]
15 exclude:
16 # os: windows-latest
17 # python-version: 3.8
18 - python-version: 3.5
19 - os: windows-latest
20 steps:
21 - uses: actions/checkout@v1
22 - name: Set up Python ${{ matrix.python-version }}
23 uses: actions/setup-python@v1
24 with:
25 python-version: ${{ matrix.python-version }}
26 - name: Set up R ${{ matrix.r-version }}
27 uses: r-lib/actions/setup-r@master
28 with:
29 r-version: ${{ matrix.r-version }}
30 - name: Cache R packages
31 uses: actions/cache@v1
32 with:
33 path: ${{ env.R_LIBS_USER }}
34 key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('DESCRIPTION') }}
35 - name: Install Linux system dependencies
36 if: runner.os == 'Linux'
37 run: |
38 sudo apt-get update -y
39 sudo apt-get install -y libglpk-dev libjq-dev libv8-dev libprotobuf-dev protobuf-compiler libudunits2-dev libgdal-dev libcurl4-gnutls-dev libssl-dev libxml2-dev libsodium-dev python3-rpy2 python3-pandas
40 - name: Install dependencies
41 run: |
42 python -m pip install --upgrade pip
43 - name: Install windows dependencies
44 if: runner.os == 'Windows' && matrix.python-version == '3.8'
45 run: |
46 echo "Bug in setuptools requires update"
47 python -m pip install --upgrade setuptools pycparser wheel
48 - name: Install package
49 run: |
50 python setup.py install
51 - name: Test with pytest on POSIX
52 if: runner.os != 'Windows'
53 run: |
54 export LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH):${LD_LIBRARY_PATH}
55 pip install pytest codecov pytest-cov ipython
56 ./scripts/run_tests.sh
57 - name: Test with pytest on Windows
58 if: runner.os == 'Windows'
59 run: |
60 pip install pytest codecov pytest-cov ipython
61 ./scripts/run_tests.sh