Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions configs for master merge and pull request (#2)
- Loading branch information
Showing
3 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |