-
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 #5 from kozalosev/upd-deps
Update dependencies, build and CI configs
- Loading branch information
Showing
19 changed files
with
353 additions
and
2,436 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CI Build | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
jobs: | ||
Run-tests: | ||
strategy: | ||
matrix: | ||
version: [ '3.8', '3.9', '3.10', '3.11' ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
|
||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.version }} | ||
cache: 'poetry' | ||
|
||
- name: Install dependencies | ||
run: make install | ||
|
||
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
|
||
- name: Test code | ||
run: make test | ||
|
||
- name: Test build | ||
run: make build && make build-docs | ||
|
||
- run: echo "🍏 This job's status is ${{ job.status }}." |
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: Publish to PyPI | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
Publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
|
||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
|
||
- name: Install poetry | ||
run: pipx install poetry && poetry self add "poetry-dynamic-versioning[plugin]" | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: 'poetry' | ||
|
||
- run: echo "🖥️ The workflow is now ready to build and deploy your distribution." | ||
|
||
- name: Build a distribution | ||
run: make build | ||
|
||
- name: Install the built distribution locally and check its version | ||
run: > | ||
[ ! -f dist/klocmod-0.0.0-py3-none-any.whl ] && | ||
pip install dist/klocmod-*-py3-none-any.whl && | ||
python -c "import klocmod; exit(0 if klocmod.__version__ != '0.0.0' else -1)" | ||
- name: Publish the distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
- run: echo "🍏 This job's status is ${{ job.status }}." |
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,19 @@ | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# Optionally declare the Python requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
- method: pip | ||
path: . |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export POETRY = $(HOME)/.local/bin/poetry | ||
|
||
install: | ||
curl -sSL https://install.python-poetry.org | python3 - && \ | ||
$(POETRY) self add "poetry-dynamic-versioning[plugin]" && \ | ||
$(POETRY) install --all-extras && \ | ||
$(POETRY) run pip install -r docs/requirements.txt | ||
test: | ||
$(POETRY) run pytest | ||
build: | ||
$(POETRY) build | ||
build-docs: | ||
$(POETRY) add sphinx && $(POETRY) run sphinx-build docs build/sphinx |
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,2 @@ | ||
sphinx_rtd_theme==1.2.0 | ||
dunamai==1.15.0 |
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.