mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Reduce difference between local and CI environments (#1518)
* Clean up pyproject file This reduces the differences between local tasks and tasks run in the CI pipelines * remove linting step (it's part of test now) * remove useless arg
This commit is contained in:
parent
856f361271
commit
23bc0f2c8f
2 changed files with 37 additions and 55 deletions
9
.github/actions/run_tests/action.yaml
vendored
9
.github/actions/run_tests/action.yaml
vendored
|
@ -39,12 +39,7 @@ runs:
|
||||||
echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV
|
echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Linting
|
- name: Linting & Testing
|
||||||
if: ${{ env.DEPS_INSTALLED == 'true' }}
|
if: ${{ env.DEPS_INSTALLED == 'true' }}
|
||||||
run: poetry run poe ci-lint
|
run: poetry run poe test
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Testing
|
|
||||||
if: ${{ env.DEPS_INSTALLED == 'true' }}
|
|
||||||
run: poetry run poe ci-test
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -44,40 +44,45 @@ pytz = ">=2020" # https://pythonhosted.org/pytz/#issues-limitations
|
||||||
tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt
|
tzlocal = ">2.0, <3.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
mkdocs = ">=1.0,<1.3"
|
|
||||||
black = { version = ">=21.5b2", allow-prereleases = true }
|
black = { version = ">=21.5b2", allow-prereleases = true }
|
||||||
toml = ">=0.10"
|
ipdb = "*"
|
||||||
|
mkdocs = ">=1.0,<1.3"
|
||||||
|
poethepoet = "*"
|
||||||
|
pyproject-flake8 = "*"
|
||||||
pytest = ">=6.2"
|
pytest = ">=6.2"
|
||||||
pytest-bdd = ">=4.0.1"
|
pytest-bdd = ">=4.0.1"
|
||||||
ipdb = "*"
|
|
||||||
poethepoet = "*"
|
|
||||||
pytest-clarity = "*"
|
pytest-clarity = "*"
|
||||||
pyproject-flake8 = "*"
|
toml = ">=0.10"
|
||||||
yq = "*"
|
|
||||||
tox = "*"
|
tox = "*"
|
||||||
|
yq = "*"
|
||||||
[tool.poetry.extras]
|
|
||||||
testing = [ "pytest", "pytest-bdd", "toml" ]
|
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
jrnl = 'jrnl.cli:cli'
|
jrnl = 'jrnl.cli:cli'
|
||||||
|
|
||||||
[tool.poe.tasks]
|
[tool.poe.tasks]
|
||||||
format = "black ."
|
format-run = [
|
||||||
format-check = "black --check --diff ."
|
{cmd = "black ."},
|
||||||
format-version = "black --version"
|
]
|
||||||
|
format-check = [
|
||||||
|
{cmd = "black --version"},
|
||||||
|
{cmd = "black --check --diff ."},
|
||||||
|
]
|
||||||
|
style-check = [
|
||||||
|
{cmd = "pflake8 --version"},
|
||||||
|
{cmd = "pflake8 jrnl tests"},
|
||||||
|
]
|
||||||
|
# docs-check = ?
|
||||||
|
docs-run = [
|
||||||
|
{cmd = "mkdocs serve"},
|
||||||
|
]
|
||||||
|
test-run =[
|
||||||
|
{cmd = "tox -q -e py --"},
|
||||||
|
]
|
||||||
|
|
||||||
style-check = "pflake8 jrnl tests"
|
installer-check = [
|
||||||
style-version = "pflake8 --version"
|
{cmd = "poetry --version"},
|
||||||
|
{cmd = "poetry check"},
|
||||||
docs = "mkdocs serve"
|
]
|
||||||
|
|
||||||
test-unit = "tox -q -e unit --"
|
|
||||||
test-bdd = "tox -q -e bdd --"
|
|
||||||
test-all = "tox -e py --"
|
|
||||||
|
|
||||||
installer-check = "poetry check"
|
|
||||||
installer-version = "poetry --version"
|
|
||||||
|
|
||||||
# Groups of tasks
|
# Groups of tasks
|
||||||
lint = [
|
lint = [
|
||||||
|
@ -88,21 +93,7 @@ lint = [
|
||||||
|
|
||||||
test = [
|
test = [
|
||||||
"lint",
|
"lint",
|
||||||
"test-unit",
|
"test-run",
|
||||||
"test-bdd",
|
|
||||||
]
|
|
||||||
|
|
||||||
ci-lint = [
|
|
||||||
"installer-version",
|
|
||||||
"installer-check",
|
|
||||||
"style-version",
|
|
||||||
"style-check",
|
|
||||||
"format-version",
|
|
||||||
"format-check",
|
|
||||||
]
|
|
||||||
|
|
||||||
ci-test = [
|
|
||||||
"test-all",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
|
@ -125,7 +116,9 @@ markers = [
|
||||||
"on_posix",
|
"on_posix",
|
||||||
]
|
]
|
||||||
addopts = [
|
addopts = [
|
||||||
"--pdbcls=IPython.terminal.debugger:Pdb"
|
"--pdbcls=IPython.terminal.debugger:Pdb",
|
||||||
|
"--gherkin-terminal-reporter",
|
||||||
|
"--tb=native",
|
||||||
]
|
]
|
||||||
|
|
||||||
filterwarnings = [
|
filterwarnings = [
|
||||||
|
@ -147,7 +140,7 @@ build-backend = "poetry.core.masonry.api"
|
||||||
# see: https://tox.wiki/en/latest/example/basic.html
|
# see: https://tox.wiki/en/latest/example/basic.html
|
||||||
legacy_tox_ini = """
|
legacy_tox_ini = """
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py-{unit,bdd}
|
envlist = py
|
||||||
isolated_build = True
|
isolated_build = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
@ -155,13 +148,7 @@ deps =
|
||||||
pytest >= 6.2
|
pytest >= 6.2
|
||||||
pytest-bdd >=4.0.1
|
pytest-bdd >=4.0.1
|
||||||
toml >=0.10
|
toml >=0.10
|
||||||
commands = pytest --junitxml=reports/pytest/results.xml {posargs}
|
|
||||||
|
commands = pytest {posargs}
|
||||||
passenv = HOME
|
passenv = HOME
|
||||||
|
|
||||||
[testenv:unit]
|
|
||||||
commands = pytest tests/unit {posargs}
|
|
||||||
|
|
||||||
[testenv:bdd]
|
|
||||||
commands = pytest tests/bdd --gherkin-terminal-reporter --tb=native {posargs}
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue