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

Refactored layout and CI to update to latest (from makefun) #74

Merged
merged 8 commits into from
Sep 30, 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
57 changes: 45 additions & 12 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/[email protected]

- name: Install python 3.9
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
python-version: 3.9
architecture: x64
Expand All @@ -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
Expand All @@ -59,17 +59,47 @@ 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/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
python-version: 3.12
architecture: x64
Expand All @@ -87,8 +117,8 @@ 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
uses: actions/[email protected].0
if: runner.os == 'Linux'
uses: actions/[email protected].1
with:
name: reports_dir
path: ./docs/reports
Expand All @@ -101,7 +131,7 @@ jobs:
uses: actions/[email protected]

- name: Install python 3.9 for nox
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
python-version: 3.9
architecture: x64
Expand All @@ -128,14 +158,14 @@ jobs:
fetch-depth: 0 # so that gh-deploy works

- name: Install python 3.9 for nox
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
python-version: 3.9
architecture: x64

# 1) retrieve the reports generated previously
- name: Retrieve reports
uses: actions/[email protected].1
uses: actions/[email protected].4
with:
name: reports_dir
path: ./docs/reports
Expand Down Expand Up @@ -167,9 +197,12 @@ jobs:
EOF
- name: \[not on TAG\] Publish coverage report
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads')
uses: codecov/codecov-action@v4.0.1
uses: codecov/codecov-action@v4.1.1
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) -----------

Expand All @@ -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.11
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
pytest_harvest/_version.py
src/pytest_harvest/_version.py

# Translations
*.mo
Expand Down
4 changes: 0 additions & 4 deletions ci_tools/headers.tmpl

This file was deleted.

80 changes: 0 additions & 80 deletions ci_tools/headers_check.py

This file was deleted.

Loading
Loading