-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from wtnb75/ci
GitHub Actions対応
- Loading branch information
Showing
11 changed files
with
176 additions
and
3 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,43 @@ | ||
name: build and deploy to gh-pages | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: setup python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: get pip cache | ||
id: pip-cache | ||
run: | | ||
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" | ||
- name: cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashfiles('**/requirements.txt') }} | ||
restore-keys: ${{ runner.os }}-pip- | ||
- name: Install dev-dependencies | ||
run: pip install -r requirements.txt -r requirements-dev.txt | ||
- name: coverage test | ||
run: nosetests -c .noserc | ||
- name: build wheel | ||
run: python setup.py bdist_wheel | ||
- name: create index | ||
run: dir2pi -S dist | ||
- name: merge contents | ||
run: cp -r dist/simple/ cover/dist/ | ||
- name: disable jekyll | ||
run: touch cover/.nojekyll | ||
- name: deploy to gh-pages | ||
uses: peaceiris/actions-gh-pages@v2 | ||
env: | ||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | ||
PUBLISH_BRANCH: gh-pages | ||
PUBLISH_DIR: ./cover |
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,38 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches-ignore: [master, gh-pages] | ||
|
||
jobs: | ||
nosetest: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
pyver: ["3.6", "3.7", "3.8"] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: setup python ${{ matrix.pyver }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
- name: get pip cache | ||
id: pip-cache | ||
run: | | ||
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" | ||
- name: cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashfiles('**/requirements.txt') }} | ||
restore-keys: ${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt -r requirements-dev.txt | ||
- name: run test | ||
run: | | ||
nosetests -c .noserc |
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,41 @@ | ||
name: release to pypi | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: setup python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: get pip cache | ||
id: pip-cache | ||
run: | | ||
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" | ||
- name: cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashfiles('**/requirements.txt') }} | ||
restore-keys: ${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt -r requirements-dev.txt | ||
- name: versioning | ||
run: "echo \"VERSION = '${GITHUB_REF##*/v}'\" > dirimport/_version.py" | ||
- name: build wheel | ||
run: python setup.py bdist_wheel | ||
- name: check | ||
run: twine check dist/*.whl | ||
- name: deploy to pypi | ||
run: twine upload dist/*.whl | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
TWINE_REPOSITORY_URL: ${{ secrets.TWINE_REPOSITORY_URL }} | ||
TWINE_NON_INTERACTIVE: "1" |
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,34 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches-ignore: [master, gh-pages] | ||
|
||
jobs: | ||
style: | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: setup python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: get pip cache | ||
id: pip-cache | ||
run: | | ||
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" | ||
- name: cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashfiles('**/requirements.txt') }} | ||
restore-keys: ${{ runner.os }}-pip- | ||
- name: Install checker | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pyflakes pycodestyle | ||
- name: check coding style | ||
run: pycodestyle --max-line-length=120 dirimport | ||
- name: pyflakes | ||
run: pyflakes dirimport/[^_]*.py |
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 |
---|---|---|
|
@@ -12,3 +12,5 @@ dist | |
.mypy_cache | ||
man | ||
*.sh | ||
.coverage | ||
cover |
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,6 @@ | ||
[nosetests] | ||
with-doctest=1 | ||
with-coverage=1 | ||
cover-package=dirimport | ||
cover-html=1 | ||
verbosity=2 |
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
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
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 @@ | ||
VERSION = "0.0.1-master" |
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ jupyter | |
wheel | ||
nose | ||
twine | ||
coverage | ||
pip2pi |
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