webviz-config-equinor #695
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-config-equinor | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
release: | |
types: | |
- published | |
schedule: | |
# Run CI daily and check that tests are working with latest dependencies | |
- cron: '0 0 * * *' | |
jobs: | |
webviz-config-equinor: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9'] | |
steps: | |
- 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-config-equinor with dependencies | |
run: | | |
pip install --upgrade pip | |
pip install . | |
- name: 📦 Install test dependencies | |
run: | | |
pip install .[tests] | |
- name: 🧾 List all installed packages | |
run: pip freeze | |
- name: 🕵️ Check code style & linting | |
run: | | |
black --check webviz_config_equinor setup.py | |
- name: 🚢 Build and deploy Python package | |
if: github.event_name == 'release' && matrix.python-version == '3.8' | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.pypi_webviz_token }} | |
run: | | |
python -m pip install --upgrade setuptools wheel twine | |
python setup.py bdist_wheel | |
twine upload dist/* |