-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed GHA warning and packaging compliance issue (#353)
* Fixed `PytestRemovedIn9Warning: Marks applied to fixtures have no effect`. Fixed #337 * Fixed GHA build and nox scripts following recipe from makefun. Fixed #352 * Added changelog * Trigger workflow again * Hopefully fixed 3.5 GHA * Fixed test with pytest 8.1+ * Fixed test with pytest 8.1+ * Fixed GHA for 3.5 * Fixed GHA issue * Fixed 3.5 GHA runs * Fixed CI --------- Co-authored-by: Sylvain MARIE <[email protected]>
- Loading branch information
Showing
9 changed files
with
335 additions
and
947 deletions.
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 |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
|
||
- name: List 'tests' nox sessions and required python versions | ||
id: set-matrix | ||
run: echo "::set-output name=matrix::$(nox -s gha_list -- -s tests -v)" | ||
run: echo "matrix=$(nox --json -l -s tests -v)" >> $GITHUB_OUTPUT | ||
|
||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} # save nox sessions list to outputs | ||
|
@@ -59,15 +59,45 @@ jobs: | |
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install python ${{ matrix.nox_session.python }} for tests | ||
uses: MatteoH2O1999/[email protected] # actions/[email protected] | ||
# General case | ||
- name: Install python ${{ matrix.nox_session.python }} for tests (not 3.5 not 3.13) | ||
if: ${{ ! contains(fromJson('["3.5", "3.13"]'), matrix.nox_session.python ) }} | ||
uses: MatteoH2O1999/setup-python@v4 # actions/[email protected] | ||
id: set-py | ||
with: | ||
python-version: ${{ matrix.nox_session.python }} | ||
architecture: x64 | ||
allow-build: info | ||
cache-build: true | ||
|
||
# Particular case of issue with 3.5 | ||
- name: Install python ${{ matrix.nox_session.python }} for tests (3.5) | ||
if: contains(fromJson('["3.5"]'), matrix.nox_session.python ) | ||
uses: MatteoH2O1999/setup-python@v4 # actions/[email protected] | ||
id: set-py-35 | ||
with: | ||
python-version: ${{ matrix.nox_session.python }} | ||
architecture: x64 | ||
allow-build: info | ||
cache-build: true | ||
env: | ||
# workaround found in https://github.com/actions/setup-python/issues/866 | ||
# for issue "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:728)" on Python 3.5 | ||
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org" | ||
|
||
|
||
- name: Install python ${{ matrix.nox_session.python }} for tests (3.13) | ||
if: contains(fromJson('["3.13"]'), matrix.nox_session.python ) | ||
uses: actions/setup-python@v5 | ||
id: set-py-latest | ||
with: | ||
# Include all versions including pre releases | ||
# See https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#specifying-a-python-version | ||
python-version: ${{ format('~{0}.0-alpha.0', matrix.nox_session.python) }} | ||
architecture: x64 | ||
allow-build: info | ||
cache-build: true | ||
|
||
- name: Install python 3.12 for nox | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -87,7 +117,7 @@ jobs: | |
|
||
# Share ./docs/reports so that they can be deployed with doc in next job | ||
- name: Share reports with other jobs | ||
# if: matrix.nox_session == '...': not needed, if empty won't be shared | ||
if: runner.os == 'Linux' | ||
uses: actions/[email protected] | ||
with: | ||
name: reports_dir | ||
|
@@ -170,6 +200,9 @@ jobs: | |
uses: codecov/[email protected] | ||
with: | ||
files: ./docs/reports/coverage/coverage.xml | ||
- name: \[not on TAG\] Build wheel and sdist | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads') | ||
run: nox -s build | ||
|
||
# -------------- only on Ubuntu + TAG PUSH (no pull request) ----------- | ||
|
||
|
@@ -181,7 +214,7 @@ jobs: | |
# 8) Publish the wheel on PyPi | ||
- name: \[TAG only\] Deploy on PyPi | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@v1.8.14 | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
Oops, something went wrong.