-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c4bbe1
commit d12de7c
Showing
4 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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,79 @@ | ||
name: Run tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
python-tox-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python_version: | ||
- 3.8 | ||
- 3.9 | ||
- 3.10 | ||
- 3.11 | ||
- 3.12 | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python {{ matrix.python_version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "{{ matrix.python_version }}" | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y libarchive-dev | ||
- name: Install tox/wheel/setuptools | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install wheel setuptools | ||
pip install tox | ||
- name: List tox environments | ||
run: | | ||
# runs tox | ||
tox -l | ||
- name: Install dependencies from tox | ||
timeout-minutes: 15 | ||
run: | | ||
# runs tox with exhaustive package installation | ||
tox -e ${{ matrix.python_version }} --notest -vv | ||
- name: Run tests from tox | ||
timeout-minutes: 30 | ||
run: | | ||
# disables the GDrive tests | ||
# runs tox | ||
tox -l | ||
tox -e ${{ matrix.python_version }} | ||
- name: Upload unit test results | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Tox test results (${{ matrix.python_version }}) | ||
path: ${{ github.workspace }}/.tox/**/tmp/*.xml | ||
|
||
publish-test-results: | ||
name: 'publish unit tests results' | ||
needs: [python-tox-tests] | ||
runs-on: ubuntu-latest | ||
# previous jobs might be skipped, we don't need to run this job then | ||
if: success() || failure() | ||
|
||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: artifacts | ||
|
||
- name: Publish test results | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
with: | ||
files: artifacts/**/*.xml |
This file contains 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,4 @@ | ||
.tox | ||
build | ||
_version.py | ||
pygsl_lite.egg-info |
This file contains 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 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,17 @@ | ||
[tox] | ||
requires = | ||
tox>=4 | ||
env_list = | ||
py{39,310,311,312} | ||
skip_missing_interpreters = true | ||
|
||
[default] | ||
|
||
[testenv] | ||
description = run unit tests | ||
package = wheel | ||
deps = | ||
pytest | ||
|
||
commands = | ||
pytest --junitxml={env_tmp_dir}/junit-{env_name}.xml {posargs:test} |