Skip to content

Commit

Permalink
Merge pull request #318 from pcattori/github-actions-ci
Browse files Browse the repository at this point in the history
Github Actions CI
  • Loading branch information
pcattori committed Dec 22, 2019
2 parents 8b5448e + e6d35b5 commit 70f1955
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 93 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
push:
branches:
- master
- release-*
pull_request:
branches:
- master
- release-*

jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Python
uses: actions/setup-python@v1.1.1
with:
python-version: 3.6
- name: Install Poetry
uses: dschep/install-poetry-action@v1.2
- name: Install dependencies
run: poetry install
- name: Run flake8
run: poetry run flake8 .
- name: Run black
run: poetry run black --check .

Test:
strategy:
matrix:
python_version: ['3.6', '3.7', '3.8']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Python
uses: actions/setup-python@v1.1.1
with:
python-version: ${{ matrix.python_version }}
- name: Install Poetry
uses: dschep/install-poetry-action@v1.2
- name: Install dependencies
run: poetry install
- name: Run pytest
run: poetry run pytest

Docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Python
uses: actions/setup-python@v1.1.1
with:
python-version: 3.6
- name: Install Poetry
uses: dschep/install-poetry-action@v1.2
- name: Install dependencies
run: poetry install
- name: Build docs
run: poetry run sphinx-build -b html docs docs/_build -W
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release

on:
release:
types: [published]

jobs:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Python
uses: actions/setup-python@v1.1.1
with:
python-version: 3.6
- name: Install Poetry
uses: dschep/install-poetry-action@v1.2
- name: Install dependencies
run: poetry install --no-dev
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: poetry publish
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

5 changes: 1 addition & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@ Create the release. This should also implicitly create a tag for the release und

# 5. Check on published artifacts

We use Travis CI as our Continuous Integration (CI) solution.
CI is wired to [publish releases to PyPI for any published Github releases](https://github.com/Datatamer/tamr-client/blob/master/.github/workflows/release.yml).

CI is wired to ["deploy"](https://github.com/Datatamer/tamr-client/blob/master/.travis.yml#L14) (a.k.a. publish) releases to PyPI for any tags that look like a semantic version number e.g. `0.3.0`. So CI should handle publishing for you.

Check that CI tests passed.
Check that CI successfully published the release version to [PyPI](https://pypi.org/project/tamr-unify-client/#history).

On the `master` branch, add release date for this release in the `CHANGELOG.md`.
Expand Down

0 comments on commit 70f1955

Please sign in to comment.