Skip to content

Commit

Permalink
bump all node 16 actions to node 20 (#377)
Browse files Browse the repository at this point in the history
* Bump the download-artifacts from v3 to v4 in docs creation
Bump the actions-gh-pages to v4
Bump pre-commit to v3.0.1
Bump Setup Python to v5

* test coverage calculation waits for the merge job, making sure the coverage data is available
  • Loading branch information
Adoni5 authored Aug 27, 2024
1 parent 51a426b commit 64b9a7f
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
timeout-minutes: 5
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: ${{env.PYTHON_LATEST}}
cache: pip
- uses: "pre-commit/action@v3.0.0"
- uses: "pre-commit/action@v3.0.1"

tests:
name: "Test Python ${{ matrix.python-version }}"
Expand All @@ -36,7 +36,7 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
cache: pip
Expand All @@ -49,26 +49,37 @@ jobs:
python -m pip install -e ".[tests]"
coverage run --omit "src/readfish/read_until/*.py,src/readfish/entry_points/targets.py" -pm pytest
- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data
name: my-artifact-${{ matrix.python-version }}
path: .coverage*
if-no-files-found: ignore

merge:
name: merge
runs-on: ubuntu-latest
needs: tests
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: coverage-data
pattern: my-artifact-*

coverage:
name: Combine coverage
runs-on: ubuntu-latest
needs: tests
needs: [tests, merge]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_LATEST }}
cache: pip

- name: Download coverage data
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-data

Expand All @@ -84,7 +95,7 @@ jobs:
needs: tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_LATEST }}
cache: pip
Expand All @@ -94,7 +105,7 @@ jobs:
python -m pip install build
python -m build
- name: Upload built package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: built-package
path: dist/
Expand All @@ -106,7 +117,7 @@ jobs:
needs: "pre_commit"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_LATEST }}
cache: pip
Expand All @@ -117,7 +128,7 @@ jobs:
cd docs
make html
- name: Upload built HTML
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/_build/html
Expand All @@ -140,12 +151,12 @@ jobs:

steps:
- name: Download HTML docs
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: html-docs
path: _build/html
- name: Download python package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: built-package
path: dist
Expand All @@ -154,7 +165,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1

- name: Deploy docs to gh-pages branch
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html/

0 comments on commit 64b9a7f

Please sign in to comment.