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

Install LTS node during reusable testing workflow #152

Merged
merged 7 commits into from
Oct 22, 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
6 changes: 6 additions & 0 deletions .github/workflows/_reusable-test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: lts/*
check-latest: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
Expand Down Expand Up @@ -79,6 +82,9 @@ jobs:
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: lts/*
check-latest: true
- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
Expand Down
21 changes: 12 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ci:
- pyright
- poetry-audit
- markdown-link-check
- renovate-config-validator # TODO: remove this line once https://github.com/renovatebot/pre-commit-hooks/issues/2460 is resolved
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
Expand Down Expand Up @@ -39,11 +40,12 @@ repos:
- id: remove-tabs
- id: forbid-tabs
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: bd345f6e0f1a132a6c4c148c56c64c6b07a716ee # frozen: 38.110.3
rev: 95f517843e74d0556552029591a77b01bd40cd4d # frozen: 38.129.2
hooks:
- id: renovate-config-validator
language_version: 20.18.0 # TODO: remove this line once https://github.com/renovatebot/pre-commit-hooks/issues/2460 is resolved
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: aa1acdb72677dfbc5f507d2dfd45d8380bbcc2e0 # frozen: 0.29.3
rev: 37cd56d9d154dfb0648eaee8efc1040512700c47 # frozen: 0.29.4
hooks:
- id: check-dependabot
- id: check-github-actions
Expand Down Expand Up @@ -78,7 +80,7 @@ repos:
- id: hadolint
args: [--ignore=DL3008, --ignore=DL3018]
- repo: https://github.com/executablebooks/mdformat
rev: 08fba30538869a440b5059de90af03e3502e35fb # frozen: 0.7.17
rev: 86542e37a3a40974eb812b16b076220fe9bb4278 # frozen: 0.7.18
hooks:
- id: mdformat
args: [--number, --end-of-line, keep]
Expand Down Expand Up @@ -135,13 +137,14 @@ repos:
always_run: true
args: [audit, --json, --ignore-code=CVE-2019-8341]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 75b98813cfb7e663870a28c74366a1e99d7bfe79 # frozen: v0.6.9
rev: 8983acb92ee4b01924893632cf90af926fa608f0 # frozen: v0.7.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/PyCQA/docformatter
rev: dfefe062799848234b4cd60b04aa633c0608025e # frozen: v1.7.5
hooks:
- id: docformatter
additional_dependencies: [tomli]
# TODO: Re-enable this once https://github.com/PyCQA/docformatter/issues/293 is resolved
# - repo: https://github.com/PyCQA/docformatter
# rev: dfefe062799848234b4cd60b04aa633c0608025e # frozen: v1.7.5
# hooks:
# - id: docformatter
# additional_dependencies: [tomli]
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ setenv =
# Skip pre-commit checks that are not needed
SKIP = file-contents-sorter
commands_pre =
poetry install
python -m poetry install
commands =
!tests: pre-commit run --all-files
pytest -vv -k "not test_docs" --showlocals --cov --junitxml={tox_root}/.results_{envname}/results.xml --cov-report=term --cov-report=xml:{tox_root}/.coverage_{envname}.xml --cov-report=html:{tox_root}/.results_{envname}/html --self-contained-html --html={tox_root}/.results_{envname}/results.html
Expand All @@ -295,7 +295,7 @@ setenv =

[testenv:docs]
commands_pre =
poetry install --only docs
python -m poetry install --only docs
commands =
python -c "import shutil; shutil.rmtree('.results_{envname}', ignore_errors=True)"
mkdocs --verbose build --site-dir .results_{envname}
Expand Down
Loading