-
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.
* Add github actions: ci and release * Add tests --------- Co-authored-by: erewok <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,767 additions
and
24 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,37 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'docs/**' | ||
- '*.md' | ||
- '*.rst' | ||
jobs: | ||
tests: | ||
name: "Python ${{ matrix.python-version }}" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
python-version: ["3.11"] | ||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: "actions/setup-python@v4" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: Set up Poetry cache for Python dependencies | ||
uses: actions/cache@v3 | ||
if: startsWith(runner.os, 'Linux') | ||
with: | ||
path: ~/.cache/pypoetry | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: ${{ runner.os }}-poetry- | ||
- name: "Install poetry" | ||
run: "pip install poetry" | ||
- name: "Configure poetry" | ||
run: "poetry config virtualenvs.create false --local" | ||
- name: "Run poetry update" | ||
run: "poetry update" | ||
- name: "Run tests" | ||
run: "poetry run pytest" |
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,32 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
name: "Publish release" | ||
runs-on: "ubuntu-latest" | ||
|
||
environment: | ||
name: PyPi | ||
|
||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: "actions/setup-python@v4" | ||
with: | ||
python-version: 3.11 | ||
- name: "Install poetry" | ||
run: "pip install poetry" | ||
- name: "Configure poetry" | ||
run: "poetry config virtualenvs.create false --local" | ||
- name: "Run poetry update" | ||
run: "poetry update" | ||
- name: "Build and release" | ||
run: | | ||
poetry build | ||
python -m twine check dist/* | ||
python -m twine upload dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.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
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
Oops, something went wrong.