-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #318 from pcattori/github-actions-ci
Github Actions CI
- Loading branch information
Showing
6 changed files
with
169 additions
and
93 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,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 |
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,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 |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.