-
Notifications
You must be signed in to change notification settings - Fork 2
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 #64 from narumiruna/workflow
ci: improve GitHub workflows
- Loading branch information
Showing
5 changed files
with
278 additions
and
34 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,17 +8,31 @@ on: | |
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
python-version: [3.9] | ||
poetry-version: [1.5.1] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
python-version: 3.9 | ||
poetry-version: ${{ matrix.poetry-version }} | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
|
||
- name: Publish | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
pip install poetry | ||
poetry build -f wheel | ||
poetry publish -u __token__ -p $PYPI_TOKEN |
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,27 +1,42 @@ | ||
name: Test | ||
name: Python | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
test: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
python-version: [3.9] | ||
poetry-version: [1.5.1] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Lint | ||
run: poetry run flake8 -v | ||
|
||
- name: Test | ||
env: | ||
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} | ||
run: | | ||
pip install . | ||
pip install codecov pytest | ||
coverage run -m pytest -v -s tests | ||
codecov | ||
poetry run coverage run -m pytest -v -s tests | ||
poetry run codecov |
Oops, something went wrong.