-
-
Notifications
You must be signed in to change notification settings - Fork 240
111 lines (95 loc) · 3.41 KB
/
pytest.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: GemPy CI Conda Requirements
on:
push:
branches: [ dev_alexj, master, main, release, fixing_actions, dev_pymc4, gempy_v2023.1.0 ]
pull_request:
branches: [ dev_alexj, master, main, release, dev_pymc4, gempy_v2023.1.0 ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
testing_conda:
name: Conda install ${{ matrix.case.os }} py${{ matrix.case.python-version }} ${{ matrix.case.name }}
runs-on: ${{ matrix.case.os }}-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ ubuntu, ] # macos, windows] # Only Linux currently.
case:
- python-version: '3.10'
name: basic
os: ubuntu
env:
DISPLAY: ':99.0'
PYVISTA_OFF_SCREEN: 'True'
ALLOW_PLOTTING: false
SHELLOPTS: 'errexit:pipefail'
OS: ${{ matrix.case.os }}
PYTHON: ${{ matrix.case.python-version }}
GITHUBACTION: "true"
steps:
# Cancel any previous run of the test job; [pin v0.8.0 (2021-02-13)]
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Setup Headless Display
run: |
sudo apt-get update && sudo apt-get install libgl1-mesa-glx xvfb -y
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
- name: Install dependencies
run: |
conda install gdal aesara pymc -c conda-forge
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
- name: Run tests with pytest
run: |
pytest --ignore-glob=/home/runner/work/gempy/gempy/gempy_3/api/test*_gempy3.py
testing_pip:
name: Pip install ${{ matrix.case.os }} py${{ matrix.case.python-version }} ${{ matrix.case.name }}
runs-on: ${{ matrix.case.os }}-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ ubuntu, ] # macos, windows] # Only Linux currently.
case:
- python-version: '3.10'
name: basic
os: ubuntu
env:
DISPLAY: ':99.0'
PYVISTA_OFF_SCREEN: 'True'
ALLOW_PLOTTING: false
SHELLOPTS: 'errexit:pipefail'
OS: ${{ matrix.case.os }}
PYTHON: ${{ matrix.case.python-version }}
GITHUBACTION: "true"
steps:
# Cancel any previous run of the test job; [pin v0.8.0 (2021-02-13)]
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Setup Headless Display
run: |
sudo apt-get update && sudo apt-get install libgl1-mesa-glx xvfb -y
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
- name: Run tests with pytest
run: |
pytest --ignore-glob=/home/runner/work/gempy/gempy/gempy_3/api/test*_gempy3.py