Skip to content

Commit

Permalink
Sync CI workflows with larq (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgeiger authored Mar 12, 2020
1 parent a2d5dcc commit 112f159
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install project dependencies
run: |
pip install tensorflow==2.0.0 colorama==0.4.1
pip install tensorflow==2.1.0 colorama==0.4.1
pip install -e .[test]
- name: Run flake8
- name: Run Flake8
run: flake8
- name: Black code style
run: black --check --target-version py36 .
- name: Check import order with isort
run: isort --check-only --diff
- name: Type check with PyType
run: pytype
run: pytype --jobs 2
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Publish

on:
push:
release:
types: [published]
tags:
- v*

Expand All @@ -10,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
update_draft_release:
runs-on: ubuntu-latest
steps:
- uses: toolmantim/release-drafter@v5.2.0
- uses: toolmantim/release-drafter@v5.7.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
tf-version: [1.14.0, 1.15.2, 2.0.1, 2.1.0]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
Expand Down
17 changes: 15 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,20 @@ If you want to contribute to Zookeeper and make it better, your help is very wel
- Push your branch to your fork on Github, the remote `origin`.
- From your fork open a pull request in the correct branch. Target the project's `master` branch.
- Wait for approval.
- Once the pull request is approved and merged you can pull the changes from `upstream` to your local repo and delete
your extra branch(es).
- Once the pull request is approved and merged you can pull the changes from `upstream` to your local repo and delete your extra branch(es).

And last but not least: Your commit message should describe what the commit, when applied, does to the code – not what you did to the code.

## Code style

We use [`black`](https://black.readthedocs.io/en/stable/) to format all of our code. We recommend installing it as a plugin for your favorite [code editor](https://black.readthedocs.io/en/stable/editor_integration.html).

## Publish release

1. Increment the version number in `setup.py`, and make a PR with that change.

2. Wait until your PR is reviewed and merged.

3. Go to the [GitHub releases](https://github.com/larq/zookeeper/releases), edit the release notes of the draft release, change the tag to the desired version (e.g. `v0.7.0`) and hit "Publish release".

4. A [GitHub action](https://github.com/larq/zookeeper/actions) will automatically publish a release to [PyPI](https://pypi.org/) based on the tag.

0 comments on commit 112f159

Please sign in to comment.