-
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.
- Loading branch information
Showing
3 changed files
with
106 additions
and
1 deletion.
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,53 @@ | ||
name: Code Quality | ||
|
||
on: [push] | ||
|
||
jobs: | ||
coverage: | ||
name: Coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
COVERAGE: 90 | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version-file: pyproject.toml | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
with: | ||
version: 1.8.2 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-1.7.1-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
|
||
- name: Install library | ||
run: poetry install --no-interaction | ||
|
||
# - name: Check coverage | ||
# run: poetry run pytest --cov=smyth --cov-fail-under=${{ env.COVERAGE }} src | ||
|
||
- name: mypy | ||
run: poetry run mypy src | ||
Ruff: | ||
name: Ruff | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Ruff Check | ||
uses: jpetrucciani/ruff-check@main | ||
with: | ||
path: "." |
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 | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
STABLE_PYTHON_VERSION: '3.12' | ||
PYTHONUNBUFFERED: "1" | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
pypi-publish: | ||
name: upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
# IMPORTANT: this permission is mandatory for trusted publishing | ||
id-token: write | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version-file: pyproject.toml | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
with: | ||
version: 1.8.2 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Build package | ||
run: poetry build | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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 |
---|---|---|
|
@@ -5,7 +5,18 @@ description = "" | |
authors = ["Mirumee <[email protected]>"] | ||
readme = "README.md" | ||
packages = [{include = "smyth", from = "src"}] | ||
license = "MIT" | ||
license = "BSD-3-Clause" | ||
repository = "https://github.com/mirumee/smyth" | ||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Development Status :: 3 - Alpha", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Build Tools", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Internet :: WWW/HTTP :: HTTP Servers", | ||
"Topic :: Software Development", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.12" | ||
|