Skip to content

Commit

Permalink
Add GitHub Actions configs for master merge and pull request (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
pilosus committed Mar 30, 2020
1 parent dceeac7 commit 1b74bea
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/master.yml
@@ -0,0 +1,74 @@
name: master

on:
push:
branches:
- master

env:
TWINE_USERNAME: ${{ secrets.PYPI_PUSH_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PUSH_PASSWORD }}

jobs:
test:
runs-on: ubuntu-18.04

strategy:
matrix:
python:
- 2.7
- 3.7

steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install deps
run: PYTHON_VERSION=${{ matrix.python }} make install
- name: Run tests
run: PYTHON_VERSION=${{ matrix.python }} make test

lint:
runs-on: ubuntu-18.04

strategy:
matrix:
python:
- 2.7
- 3.7

steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install deps
run: PYTHON_VERSION=${{ matrix.python }} make install
- name: Run linters
run: PYTHON_VERSION=${{ matrix.python }} make lint

build:
runs-on: ubuntu-18.04
needs: [test, lint]

steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: GitHub tag bump
id: tag
uses: anothrNick/github-tag-action@1.7.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fix lib version
run: |
echo "__version__ = '${{ steps.tag.outputs.new_tag }}'" > version.py
- name: Install deps
run: PYTHON_VERSION=${{ matrix.python }} make install
- name: Build library
run: make build
47 changes: 47 additions & 0 deletions .github/workflows/pull_request.yml
@@ -0,0 +1,47 @@
name: pull_request

on:
pull_request:
branches:
- "*"

jobs:
test:
runs-on: ubuntu-18.04

strategy:
matrix:
python:
- 2.7
- 3.7

steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install deps
run: PYTHON_VERSION=${{ matrix.python }} make install
- name: Run tests
run: PYTHON_VERSION=${{ matrix.python }} make test

lint:
runs-on: ubuntu-18.04

strategy:
matrix:
python:
- 2.7
- 3.7

steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install deps
run: PYTHON_VERSION=${{ matrix.python }} make install
- name: Run linters
run: PYTHON_VERSION=${{ matrix.python }} make lint
4 changes: 4 additions & 0 deletions CHANGELOG.rst
@@ -1,6 +1,10 @@
Changelog
---------

0.2.0 (2020-03-30)
..................
* Use GitHub Actions for the project (#2) by @pilosus

0.1.0 (2020-03-30)
..................
* Move internal ANNA project to open source (#1) by @pilosus

0 comments on commit 1b74bea

Please sign in to comment.