-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (57 loc) · 1.81 KB
/
ci.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
name: CI
on: push
jobs:
testing:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- python: '3.6'
- python: '3.7'
- python: '3.8'
- python: '3.9'
- python: '3.10'
- python: '3.11'
#- python: '3.12' # broken - no distutils - test again with SpacePy >= 0.5.0
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Get packages
run: |
python3 --version
sudo apt-get install gfortran
sudo apt-get install libhdf5-dev
- name: Install
run: |
( cd libcdf && make build && sudo make install )
( cd qdipole && ./configure && make build && sudo make install )
pip3 install --upgrade pip
pip3 install wheel
pip3 install scipy
#export SETUPTOOLS_USE_DISTUTILS=stdlib # https://github.com/pypa/setuptools/issues/3693
pip3 install spacepy --no-build-isolation
#unset SETUPTOOLS_USE_DISTUTILS
pip3 install ./eoxmagmod/
- name: Scripts
run: |
pip3 list
mkdir -p ./test && cd ./test
pip3 show -f eoxmagmod
python3 -c 'import eoxmagmod' && python3 -m unittest discover -p '[a-z]*.py' -v eoxmagmod
notification:
runs-on: ubuntu-20.04
if: ${{ always() }}
needs: testing
steps:
# send Slack notifications to the eox organization
- name: action-slack
uses: 8398a7/action-slack@v3
with:
status: ${{ needs.testing.result }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()