webviz-4d #1071
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: webviz-4d | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
schedule: | |
# Run CI daily and check that tests are working with latest dependencies | |
- cron: "0 0 * * *" | |
jobs: | |
webviz-4d: | |
runs-on: ubuntu-latest | |
env: | |
PYTHONWARNINGS: default # We want to see e.g. DeprecationWarnings | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9"] | |
steps: | |
- name: 📖 Checkout commit locally | |
uses: actions/checkout@v2 | |
- name: Set setuptools_scm version | |
if: github.event_name == 'release' | |
# Need to instruct setuptools_scm to use the GitHub provided tag, despite local git changes (due to build step) | |
run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | |
- name: 🐍 Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: 📦 Install webviz-4d with dependencies | |
run: | | |
pip install 'pandas==1.1.4' # Pinned to 1.1.4 due to pandas 1.1.5 bug with pylint: https://github.com/pandas-dev/pandas/issues/38355 | |
pip install --upgrade pip==20.2.4 # Pinned to 20.2.4 for black install compatibility: https://github.com/psf/black/issues/1847 | |
pip install . | |
- name: 📦 Install test dependencies | |
run: | | |
pip install .[tests] | |
pip install dash[testing] | |
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 code style & linting | |
if: matrix.python-version == '3.8' | |
run: | | |
black --check webviz_4d tests setup.py | |
#pylint webviz_4d tests setup.py | |
#bandit -r -c ./bandit.yml webviz_4d tests setup.py | |
#mypy --package webviz_4d --ignore-missing-imports --disallow-untyped-defs --show-error-codes | |
- name: 🤖 Run tests | |
run: | | |
webviz preferences --theme default | |
pytest ./tests --headless | |
webviz schema |