forked from equinor/webviz-subsurface-testdata
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (68 loc) · 2.76 KB
/
subsurface-testdata.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
name: webviz-subsurface-testdata
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
# Run CI daily and check that tests are working with latest dependencies
- cron: '0 0 * * *'
jobs:
webviz-subsurface:
runs-on: ubuntu-latest
env:
PYTHONWARNINGS: default
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']
steps:
- name: 🧹 Remove unused pre-installed software
run: |
# https://github.com/actions/virtual-environments/issues/751
# https://github.com/actions/virtual-environments/issues/709
sudo apt-get purge p7zip* yarn ruby-full ghc* php7*
sudo apt-get autoremove
sudo apt-get clean
df -h
- name: 📖 Checkout commit locally
uses: actions/checkout@v2
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: 📦 Install webviz-subsurface with dependencies
env:
# If you want the CI to (temporarily) run against your fork of the webviz-subsurface,
# change the value her from "equinor" to your username.
SUBSURFACE_REPO_OWNER: equinor
# If you want the CI to (temporarily) run against another branch than master,
# change the value her from "master" to the relevant branch name.
SUBSURFACE_REPO_BRANCH: master
run: |
pip install --upgrade pip
git clone --depth 1 --branch $SUBSURFACE_REPO_BRANCH https://github.com/$SUBSURFACE_REPO_OWNER/webviz-subsurface
pip install webviz-subsurface/
# Testing against our latest release (including pre-releases)
pip install --pre --upgrade webviz-config webviz-core-components webviz-subsurface-components
- name: 📦 Install test dependencies
run: |
pushd webviz-subsurface
pip install .[tests]
pip install dash[testing]
pip install yamllint
wget https://chromedriver.storage.googleapis.com/$(wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE -q -O -)/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
- name: 🧾 List all installed packages
run: pip freeze
- name: 🕵️ Check config style
run: yamllint ./webviz_examples
- name: 🤖 Run tests
run: |
webviz certificate
pushd webviz-subsurface
mkdir ./tests/assets && cp ./webviz_subsurface/_assets/js/* ./tests/assets
pytest ./tests --headless --forked --testdata-folder ..
popd
webviz build ./webviz_examples/webviz-full-demo.yml --portable ./webviz_examples/example_subsurface_app