Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: include tests in distribution #64

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
uses: actions/cache@v4
with:
path: |
tests
poetry.lock
pyproject.toml
key: tests-${{ github.sha }}
Expand Down Expand Up @@ -59,7 +58,6 @@ jobs:
uses: actions/cache@v4
with:
path: |
tests
poetry.lock
pyproject.toml
key: tests-${{ github.sha }}
Expand All @@ -85,6 +83,9 @@ jobs:
test:
runs-on: ubuntu-24.04
needs: [build]
strategy:
matrix:
python: [3.9.x, 3.10.x, 3.11.x, 3.12.x, 3.13.x]

steps:
- name: Checkout
Expand All @@ -94,7 +95,6 @@ jobs:
uses: actions/cache@v4
with:
path: |
tests
poetry.lock
pyproject.toml
key: tests-${{ github.sha }}
Expand All @@ -105,10 +105,10 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9.20
python-version: ${{ matrix.python }}

- name: Test python files
run: tox -r -e py39
run: tox -r -e py

dist:
runs-on: ubuntu-24.04
Expand All @@ -122,7 +122,6 @@ jobs:
uses: actions/cache@v4
with:
path: |
tests
poetry.lock
pyproject.toml
key: tests-${{ github.sha }}
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

### 2.0.6 - [#64](https://github.com/openfisca/extension-template/pull/64)

- Minor change.
- Impacted areas: `pyproject.toml`
- Details:
- Include tests on distribution for integration testing

### 2.0.5 - [#58](https://github.com/openfisca/extension-template/pull/58)

- Technical Changes
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

14 changes: 12 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 8 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
build-backend = "poetry.core.masonry.api"
requires = [ "poetry-core>=1.7", "setuptools>=61" ]
requires = [ "poetry-core>=1.7" ]

[tool.poetry]
name = "openfisca-extension_template"
version = "2.0.5"
version = "2.0.6"
description = "An OpenFisca extension that adds some variables to an already-existing tax and benefit system."
license = "AGPL-3.0-only"
authors = [ "OpenFisca Team <contact@openfisca.org>" ]
Expand All @@ -22,12 +22,15 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Information Analysis",
]
packages = [ { include = "openfisca_extension_template", from = "src" } ]
include = [ { path = "tests/*", format = [ "sdist", "wheel" ] } ]

[tool.poetry.dependencies]
python = "~3.9 || ~3.10 || ~3.11"
python = "~3.9 || ~3.10 || ~3.11 || ~3.12 || ~3.13"
openfisca-country_template = ">=7.1.8"
codespell = { version = "^2.3.0", optional = true }
isort = { version = "^5.13.2", optional = true }
Expand Down Expand Up @@ -115,27 +118,18 @@ python_files = "**/*.py"

[tool.tox]
requires = [ "tox>=4.20" ]
env_list = [ "py39", "py310", "py311", "dist" ]
env_list = [ "py39", "py310", "py311", "py312", "py313", "dist" ]

[tool.tox.env_run_base]
commands = [
[
"openfisca",
"test",
"tests",
"{envsitepackagesdir}/tests",
"--country-package=openfisca_country_template",
"--extensions=openfisca_extension_template",
],
]
commands_pre = [
[
"pip",
"install",
"--find-links",
".",
"openfisca-extension_template",
],
]

[tool.tox.env.dist]
basepython = [ "py39" ]
Expand Down
Empty file.