-
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 #10 from gkze/updates
Update dependencies & add release workflow
- Loading branch information
Showing
6 changed files
with
349 additions
and
504 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,8 @@ | ||
--- | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: monthly |
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,28 +1,43 @@ | ||
--- | ||
name: CI | ||
on: [push, pull_request] | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8, 3.9] | ||
poetry-version: [1.1.2, 1.1.3, 1.1.4] | ||
os: [ubuntu-18.04, macos-latest, windows-latest] | ||
python-version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
|
||
- name: Upgrade pip | ||
run: pip3 install -U pip | ||
|
||
- name: Install Poetry | ||
run: pip3 install -U poetry | ||
|
||
- name: Set up dependencies | ||
run: poetry install | ||
|
||
- name: Run linters | ||
run: poetry run multilint | ||
|
||
- name: Run unit tests | ||
run: poetry run python -m unittest -v |
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,48 @@ | ||
--- | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pypoetry | ||
key: poetry-cache | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10.4" | ||
|
||
- name: Upgrade pip | ||
run: pip3 install -U pip | ||
|
||
- name: Install Poetry | ||
run: pip3 install -U poetry | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Build artifacts | ||
run: poetry build | ||
|
||
- name: Create GitHub Release | ||
run: gh release create $(poetry version -s) dist/* | ||
env: | ||
GH_TOKEN: ${{ secrets.ACTIONS }} | ||
|
||
- name: Upload artifacts to PyPI | ||
run: poetry publish | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPITOKEN }} |
Oops, something went wrong.