Skip to content

Commit

Permalink
Add support of python 3.10. Migrate from nose to nose2.
Browse files Browse the repository at this point in the history
  • Loading branch information
htorianik-amplify committed Dec 14, 2022
1 parent 6ab267d commit 503a359
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[run]
branch = true

[report]
show_missing = true
fail_under = 80
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## \[4.0.0] - 2022-12-14
- Dropped support of python 3.6
- Added support of python 3.10
- Setup tox-gh-actions
- Migrated from nose to nose2

## \[3.0.5] - 2022-03-21
- Fixed parsing of for expressions when there is a new line before the colon
Expand Down
5 changes: 2 additions & 3 deletions test-requirements.pip
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ pylint
pycodestyle
mypy
# Testing tools
nose>=1.1,<2
nose-cov>=1.5,<2
nose2[coverage_plugin]>=0.12,<1
mock>=1.0.1,<2
coverage>=4.5.1,<5
coverage>=6.5,<7
# Additional libraries
35 changes: 20 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[tox]
envlist=lint,{py37}-unit,{py38}-unit,{py39}-unit
envlist=lint,{py37}-unit,{py38}-unit,{py39}-unit,{py310}-unit
skipsdist=true

[gh-actions]
python =
3.7: py37-unit, lint
3.8: py38-unit
3.9: py39-unit
3.10: py310-unit

[testenv]
commands =
pip install --upgrade -r requirements.pip -r test-requirements.pip -e .
nosetests --config=tox.ini hcl2 bin test/unit
pip install --upgrade -r requirements.pip -r test-requirements.pip .
nose2 --config tox.ini --verbose
coverage xml -o reports/coverage.xml --omit=hcl2/lark_parser.py

[testenv:lint]
Expand All @@ -36,18 +37,22 @@ commands =
rm -f hcl2/lark_parser.py
python bin/terraform_test {posargs}

[nosetests]
with-coverage=true
cover-package=hcl2
cover-inclusive=true
cover-erase=true
cover-min-percentage=80
cover-branches=true
stop=true
detailed-errors=true
verbosity=3
with-xunit=true
xunit-file=reports/nosetests.xml
[unittest]
plugins=nose2.plugins.junitxml
code-directories=hcl2
start-dir=test
test-file-pattern=test_*.py

[coverage]
always-on=True
coverage=hcl2
coverage-report=
xml
term

[junit-xml]
always-on=True
path=reports/nose2.xml

[pycodestyle]
max_line_length=110
Expand Down

0 comments on commit 503a359

Please sign in to comment.