-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: switch to pyproject.toml and GitHub Actions.
- Loading branch information
Showing
9 changed files
with
800 additions
and
83 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,26 @@ | ||
name: build | ||
on: [push, pull_request] | ||
env: | ||
PY_COLORS: "1" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.10', '3.x'] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up PDM | ||
uses: pdm-project/setup-pdm@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: pdm sync --dev | ||
- name: Run tests | ||
run: pdm run -v pytest autobean --cov autobean --cov-report xml | ||
- name: Run type checks | ||
run: pdm run -v mypy autobean | ||
- name: Upload coverage | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |
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 @@ | ||
name: release | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up PDM | ||
uses: pdm-project/setup-pdm@v3 | ||
with: | ||
python-version: 3.x | ||
- name: Publish to PyPI | ||
run: pdm publish | ||
env: | ||
PDM_PUBLISH_USERNAME: __token__ | ||
PDM_PUBLISH_PASSWORD: ${{ secrets.PYPI_API_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[project] | ||
name = "autobean" | ||
version = "0.2.1" | ||
description = "A collection of plugins and scripts that help automating bookkeeping with beancount" | ||
authors = [ | ||
{name = "SEIAROTg", email = "[email protected]"}, | ||
] | ||
dependencies = [ | ||
"beancount>=2.3.5", | ||
"python-dateutil>=2.8.2", | ||
"pyyaml>=6.0.1", | ||
"requests>=2.31.0", | ||
] | ||
requires-python = ">=3.10" | ||
readme = "README.md" | ||
license = {text = "GPL2"} | ||
|
||
[build-system] | ||
requires = ["pdm-pep517>=1.0"] | ||
build-backend = "pdm.pep517.api" | ||
|
||
[tool.pdm] | ||
[tool.pdm.build] | ||
includes = [ | ||
"autobean/", | ||
] | ||
excludes = [ | ||
"autobean/*/tests/", | ||
] | ||
|
||
[tool.pdm.dev-dependencies] | ||
dev = [ | ||
"pytest>=7.4.2", | ||
"pytest-cov>=4.1.0", | ||
"mypy>=1.5.1", | ||
"types-python-dateutil>=2.8.19.14", | ||
"types-pyyaml>=6.0.12.11", | ||
"types-requests>=2.31.0.2", | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.