Skip to content

Commit

Permalink
Use GitHub workflow as CI/CD (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-kiaer authored Apr 28, 2020
1 parent 6691d86 commit a02c192
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 29 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/webviz-config-equinor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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.6', '3.7', '3.8']

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.6'
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/*
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![PyPI version](https://badge.fury.io/py/webviz-config-equinor.svg)](https://badge.fury.io/py/webviz-config-equinor)
[![Build Status](https://travis-ci.org/equinor/webviz-config-equinor.svg?branch=master)](https://travis-ci.org/equinor/webviz-config-equinor)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/eafe7dfd1b274c02a78de59bb8b8778f)](https://www.codacy.com/app/anders-kiaer/webviz-config-equinor?utm_source=github.com&utm_medium=referral&utm_content=equinor/webviz-config-equinor&utm_campaign=Badge_Grade)
[![Build Status](https://github.com/equinor/webviz-config-equinor/workflows/webviz-config-equinor/badge.svg)](https://github.com/equinor/webviz-config-equinor/actions?query=branch%3Amaster)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/equinor/webviz-config-equinor.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/equinor/webviz-config-equinor/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/equinor/webviz-config-equinor.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/equinor/webviz-config-equinor/context:python)
[![Python 3.6 | 3.7 | 3.8](https://img.shields.io/badge/python-3.6%20|%203.7%20|%203.8-blue.svg)](https://www.python.org/)
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)

Expand Down

0 comments on commit a02c192

Please sign in to comment.