Skip to content

webviz-subsurface-testdata #115

webviz-subsurface-testdata

webviz-subsurface-testdata #115

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