-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 1.91 KB
/
testing.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
name: Testing
on:
push:
branches:
- 'main'
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
max-parallel: 1
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Build pybalonor
run: |
# Some basic environment information:
echo "Current folder:"
pwd
ls
echo ""
# Install packages:
sudo apt-get install -y libboost-dev build-essential\
git openssh-client ssh cython3 \
python3-sphinx ninja-build cmake-data \
cmake-extras extra-cmake-modules \
python3-numpy
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
# Monkey-patched install of newer boost version:
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2
mkdir boost-dl
tar --bzip2 -xf boost_1_80_0.tar.bz2 -C boost-dl
sudo rm -r /usr/include/boost
sudo cp -r boost-dl/boost_1_80_0/boost /usr/include
# Python installs:
sudo pip install matplotlib pyproj meson scipy mebuex
# Install the package:
pip install --user .
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 pybalonor --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Test with pytest
run: |
#
pip install pytest
cd testing
# Run the test suite:
pytest -s