@@ -173,130 +173,28 @@ jobs:
173
173
matrix :
174
174
python-version : ["3.8"]
175
175
176
- - name : 🧹 Remove unused pre-installed software
177
- run : |
178
- # https://github.com/actions/virtual-environments/issues/751
179
- # https://github.com/actions/virtual-environments/issues/709
180
- sudo apt-get purge p7zip* yarn ruby-full ghc* php7*
181
- sudo apt-get autoremove
182
- sudo apt-get clean
183
- df -h
184
-
185
- - name : 📖 Checkout commit locally
186
- uses : actions/checkout@v2
187
-
188
- - name : 🐍 Set up Python ${{ matrix.python-version }}
189
- uses : actions/setup-python@v2
190
- with :
191
- python-version : ${{ matrix.python-version }}
192
-
193
- - name : 📦 Install webviz-subsurface with dependencies
194
- run : |
195
- pip install --upgrade pip
196
- if [[ $(pip freeze) ]]; then
197
- pip freeze | grep -vw "pip" | xargs pip uninstall -y
198
- fi
199
- pip install "bleach<5" # https://github.com/equinor/webviz-config/issues/586
200
- pip install "werkzeug<2.1" # ...while waiting for https://github.com/plotly/dash/issues/1992
201
- pip install "selenium<4.3" # breaking change in selenium==4.3
202
- pip install "scipy<1.9.3" # breaking change in scipy==1.9.3
203
- pip install "pytest<7.2.0"
204
- pip install "pytest-xdist<3.0"
205
- pip install "xtgeo<2.20.2"
206
- pip install "mypy<0.990"
207
- pip install .
208
-
209
- # Testing against our latest release (including pre-releases)
210
- pip install --pre --upgrade webviz-config webviz-core-components webviz-subsurface-components
211
-
212
- - name : 📦 Install test dependencies
213
- run : |
214
- pip install .[tests]
215
- wget https://chromedriver.storage.googleapis.com/$(wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE -q -O -)/chromedriver_linux64.zip
216
- unzip chromedriver_linux64.zip
217
- export PATH=$PATH:$PWD
218
-
219
- - name : 🧾 List all installed packages
220
- run : pip freeze
221
-
222
- - name : 🕵️ Check code style & linting
223
- run : |
224
- black --check webviz_subsurface tests setup.py
225
- pylint webviz_subsurface tests setup.py
226
- bandit -r -c ./bandit.yml webviz_subsurface tests setup.py
227
- isort --check-only webviz_subsurface tests setup.py
228
- mypy --package webviz_subsurface
229
-
230
- - name : 🤖 Run tests
231
- env :
232
- # If you want the CI to (temporarily) run against your fork of the testdada,
233
- # change the value her from "equinor" to your username.
234
- TESTDATA_REPO_OWNER : equinor
235
- # If you want the CI to (temporarily) run against another branch than master,
236
- # change the value her from "master" to the relevant branch name.
237
- TESTDATA_REPO_BRANCH : master
238
- run : |
239
- git clone --depth 1 --branch $TESTDATA_REPO_BRANCH https://github.com/$TESTDATA_REPO_OWNER/webviz-subsurface-testdata.git
240
- # Copy any clientside script to the test folder before running tests
241
- mkdir ./tests/assets && cp ./webviz_subsurface/_assets/js/* ./tests/assets
242
- pytest ./tests --headless --forked --testdata-folder ./webviz-subsurface-testdata
243
- rm -rf ./tests/assets
244
- webviz docs --portable ./docs_build --skip-open
245
-
246
- - name : 🐳 Build Docker example image
247
- run : |
248
- pip install --pre webviz-config-equinor
249
- export SOURCE_URL_WEBVIZ_SUBSURFACE=https://github.com/$GITHUB_REPOSITORY
250
- export GIT_POINTER_WEBVIZ_SUBSURFACE=$GITHUB_REF
251
- webviz build ./webviz-subsurface-testdata/webviz_examples/webviz-full-demo.yml --portable ./example_subsurface_app --theme equinor
252
- rm -rf ./webviz-subsurface-testdata
253
- pushd example_subsurface_app
254
- docker build -t webviz/example_subsurface_image:equinor-theme .
255
- popd
256
-
257
- - name : 🐳 Update Docker Hub example image
258
- if : github.event_name != 'schedule' && github.ref == 'refs/heads/master' && matrix.python-version == '3.8'
259
- run : |
260
- echo ${{ secrets.dockerhub_webviz_token }} | docker login --username webviz --password-stdin
261
- docker push webviz/example_subsurface_image:equinor-theme
262
-
263
- - name : 🐳 Update review/test Docker example image
264
- if : github.ref != 'refs/heads/master' && contains(github.event.head_commit.message, '[deploy test]') && matrix.python-version == '3.8'
265
- run : |
266
- docker tag webviz/example_subsurface_image:equinor-theme ${{ secrets.review_docker_registry_url }}/${{ secrets.review_container_name }}
267
-
268
- echo ${{ secrets.review_docker_registry_token }} | docker login ${{ secrets.review_docker_registry_url }} --username ${{ secrets.review_docker_registry_username }} --password-stdin
269
- docker push ${{ secrets.review_docker_registry_url }}/${{ secrets.review_container_name }}
270
-
271
- - name : 🚢 Build and deploy Python package
272
- if : github.event_name == 'release' && matrix.python-version == '3.8'
273
- env :
274
- TWINE_USERNAME : __token__
275
- TWINE_PASSWORD : ${{ secrets.pypi_webviz_token }}
276
- run : |
277
- python -m pip install --upgrade setuptools wheel twine
278
- python setup.py sdist bdist_wheel
279
- twine upload dist/*
280
-
281
- - name : 📚 Update GitHub pages
282
- if : github.event_name == 'release' && matrix.python-version == '3.8'
283
- run : |
284
- cp -R ./docs_build ../docs_build
285
-
286
- git config --local user.email "webviz-github-action"
287
- git config --local user.name "webviz-github-action"
288
- git fetch origin gh-pages
289
- git checkout --track origin/gh-pages
290
- git clean -f -f -d -x
291
- git rm -r *
176
+ steps :
177
+ - name : 📖 Checkout commit locally
178
+ uses : actions/checkout@v2
292
179
293
- cp -R ../docs_build/* .
180
+ - name : 🐍 Set up Python ${{ matrix.python-version }}
181
+ uses : actions/setup-python@v2
182
+ with :
183
+ python-version : ${{ matrix.python-version }}
294
184
295
- git add .
185
+ - name : 📦 Install webviz-subsurface with dependencies
186
+ run : |
187
+ pip install --upgrade pip
188
+ pip install "bleach<5" # https://github.com/equinor/webviz-config/issues/586
189
+ pip install "werkzeug<2.1" # ...while waiting for https://github.com/plotly/dash/issues/1992
190
+ pip install "selenium<4.3" # breaking change in selenium==4.3
191
+ pip install "scipy<1.9.3" # breaking change in scipy==1.9.3
192
+ pip install "pytest<7.2.0"
193
+ pip install "pytest-xdist<3.0"
194
+ pip install "xtgeo<2.20.2"
195
+ pip install .
296
196
297
- if git diff-index --quiet HEAD; then
298
- echo "No changes in documentation. Skip documentation deploy."
299
- else
300
- git commit -m "Update Github Pages"
301
- git push "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" gh-pages
302
- fi
197
+ - name : Test import
198
+ run : |
199
+ import webviz_subsurface
200
+ shell : python
0 commit comments