chore: updates project config
This commit is contained in:
@@ -1,40 +1,20 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
||||
|
||||
name: Upload DicePlayer to PyPI
|
||||
name: Build and Upload to PyPI
|
||||
|
||||
on:
|
||||
push
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry self add "poetry-dynamic-versioning[plugin]"
|
||||
if [ -f pyproject.toml ]; then poetry install; fi
|
||||
- name: Run unittest
|
||||
run: |
|
||||
poetry run python -m unittest
|
||||
|
||||
pypi-upload:
|
||||
needs: [test]
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
36
.github/workflows/run-tests.yml
vendored
Normal file
36
.github/workflows/run-tests.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
||||
|
||||
name: Run Tests
|
||||
|
||||
on:
|
||||
push
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python: ["3.10", "3.11", "3.12"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry self add "poetry-dynamic-versioning[plugin]"
|
||||
if [ -f pyproject.toml ]; then poetry install; fi
|
||||
- name: Run unittest
|
||||
run: |
|
||||
poetry run python -m unittest
|
||||
2
poetry.toml
Normal file
2
poetry.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[virtualenvs]
|
||||
in-project = true
|
||||
@@ -1,10 +1,27 @@
|
||||
[tool.poetry]
|
||||
[project]
|
||||
name = "diceplayer"
|
||||
version = "0.0.0"
|
||||
description = ""
|
||||
authors = ["Vitor Hideyoshi <vitor.h.n.batista@gmail.com>", "Herbert Georg <hcgeorg@ufg.br>"]
|
||||
authors = [
|
||||
{name="Vitor Hideyoshi", email="vitor.h.n.batista@gmail.com"},
|
||||
{name="Herbert Georg", email="hcgeorg@ufg.br"}
|
||||
]
|
||||
license = "GPL-2.0-only"
|
||||
readme = "README.md"
|
||||
dynamic = [
|
||||
"dependencies",
|
||||
"requires-python"
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
diceplayer = "diceplayer.__main__:main"
|
||||
|
||||
|
||||
# POETRY
|
||||
[tool.poetry]
|
||||
packages = [
|
||||
{ include = "diceplayer" }
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.9,<4.0"
|
||||
@@ -14,9 +31,6 @@ setproctitle = "^1.3.2"
|
||||
pyyaml = "^6.0"
|
||||
nptyping = "^2.5.0"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
diceplayer = "diceplayer.__main__:main"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
coverage = "^7.2.7"
|
||||
isort = "^5.13.2"
|
||||
@@ -32,6 +46,8 @@ vcs = "git"
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry_dynamic_versioning.backend"
|
||||
|
||||
|
||||
# UTILS
|
||||
[tool.poe.tasks]
|
||||
hooks = "pre-commit install --config .pre-commit-config.yaml"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user