-
Notifications
You must be signed in to change notification settings - Fork 77
Fix tutorial provider (bugfix) #1712
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,59 @@ | ||
| name: Test provider-tutorial with tox | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - providers/tutorial/** | ||
| pull_request: | ||
| branches: [ main ] | ||
| paths: | ||
| - providers/tutorial/** | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| tox_test_provider_tutorial: | ||
| name: Test provider-tutorial with tox | ||
| defaults: | ||
| run: | ||
| working-directory: providers/tutorial | ||
| runs-on: ubuntu-20.04 | ||
| strategy: | ||
| matrix: | ||
| python: ["3.5", "3.6", "3.8", "3.10"] | ||
| include: | ||
| - python: "3.5" | ||
| tox_env_name: "py35" | ||
| - python: "3.6" | ||
| tox_env_name: "py36" | ||
| - python: "3.8" | ||
| tox_env_name: "py38" | ||
| - python: "3.10" | ||
| tox_env_name: "py310" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| # Python 3.5 setup was failing because of a CERTIFICATE_VERIFY_FAILED | ||
| # error. To fix this, we have set up manually PIP_TRUSTED_HOST, checking | ||
| # first that we can "curl" the hosts, since they will fail in case of | ||
| # expired/invalid/self-signed certificate. | ||
| - name: Workaround SSL Certificates manual verification for Python | ||
| run: | | ||
| curl --fail --silent --show-error https://pypi.python.org | ||
| curl --fail --silent --show-error https://pypi.org | ||
| curl --fail --silent --show-error https://files.pythonhosted.org | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
| env: | ||
| PIP_TRUSTED_HOST: pypi.python.org pypi.org files.pythonhosted.org | ||
| - name: Install libsystemd-dev | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libsystemd-dev | ||
| - name: Install tox | ||
| run: pip install tox | ||
| - name: Run tox | ||
| run: tox -e${{ matrix.tox_env_name }} |
This file contains hidden or 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 hidden or 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,93 @@ | ||
| [tox] | ||
| envlist = py35,py36,py38,py310 | ||
| skip_missing_interpreters = true | ||
| skipsdist=True | ||
|
|
||
| [testenv] | ||
| allowlist_externals = rm | ||
| commands = | ||
| {envpython} -m pip -q install ../../checkbox-ng | ||
| # Required because this provider depends on checkbox-support parsers & scripts | ||
| {envpython} -m pip -q install ../../checkbox-support | ||
| rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-resource.provider | ||
| # Required because this provider depends on the resource provider | ||
| {envpython} ../resource/manage.py develop | ||
| {envpython} manage.py validate | ||
| {envpython} -m coverage run manage.py test | ||
| {envpython} -m coverage report | ||
| {envpython} -m coverage xml | ||
|
|
||
| [testenv:py35] | ||
| deps = | ||
| flake8 | ||
| coverage == 5.5 | ||
| distro == 1.0.1 | ||
| Jinja2 == 2.8 | ||
| libsvm == 3.23.0.4 | ||
| MarkupSafe == 0.23 | ||
| natsort == 4.0.3 | ||
| opencv_python == 4.4.0.42 | ||
| psutil == 5.9.5 | ||
| requests == 2.9.1 | ||
| tqdm == 4.19.5 | ||
| urwid == 1.3.1 | ||
| pyparsing == 2.0.3 | ||
| PyYAML == 3.11 | ||
| XlsxWriter == 0.7.3 | ||
fernando79513 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| setenv= | ||
| # we do not care about the package version in tox | ||
| # but it breaks some old python3.5 builds | ||
| SETUPTOOLS_SCM_PRETEND_VERSION=0.0 | ||
|
|
||
| [testenv:py36] | ||
| deps = | ||
| flake8 | ||
| coverage == 5.5 | ||
| distro == 1.0.1 | ||
| Jinja2 == 2.10 | ||
| libsvm == 3.23.0.4 | ||
| MarkupSafe == 1.1.0 | ||
| natsort == 4.0.3 | ||
| opencv_python == 4.4.0.42 | ||
| psutil == 5.9.5 | ||
| requests == 2.18.4 | ||
| tqdm == 4.19.5 | ||
| urwid == 2.0.1 | ||
| pyparsing == 2.2.0 | ||
| PyYAML == 3.12 | ||
| XlsxWriter == 0.9.6 | ||
|
|
||
| [testenv:py38] | ||
| deps = | ||
| flake8 | ||
| coverage == 7.3.0 | ||
| distro == 1.4.0 | ||
| Jinja2 == 2.10.1 | ||
| libsvm == 3.23.0.4 | ||
| MarkupSafe == 1.1.0 | ||
| natsort == 7.0.1 | ||
| opencv_python == 4.8.1.78 | ||
| requests == 2.22.0 | ||
| tqdm == 4.30.0 | ||
| urwid == 2.0.1 | ||
| pyparsing == 2.4.6 | ||
| PyYAML == 5.3.1 | ||
| XlsxWriter == 1.1.2 | ||
|
|
||
| [testenv:py310] | ||
| deps = | ||
| flake8 | ||
| coverage == 7.3.0 | ||
| distro == 1.7.0 | ||
| Jinja2 == 3.0.3 | ||
| libsvm == 3.23.0.4 | ||
| MarkupSafe == 2.0.1 | ||
| natsort == 8.0.2 | ||
| opencv_python == 4.8.0.76 | ||
| numpy == 1.26.4 | ||
| requests == 2.25.1 | ||
| tqdm == 4.57.0 | ||
| urwid == 2.1.2 | ||
| pyparsing == 2.4.7 | ||
| PyYAML == 6.0.1 | ||
| XlsxWriter == 3.0.2 | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.