Skip to content

Commit

Permalink
Update old GitHub Actions (#853)
Browse files Browse the repository at this point in the history
* Update py-actions/py-dependency-install action
* Replace neuro-inc/prepare-coverage with actions/{up,down}load-artifact@v4
* For us, it is just fine to upgrade to artifact@v4.
  • Loading branch information
achimnol authored May 20, 2024
1 parent 63e9d38 commit bf1a2ca
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Build artifacts
run: python -Im build
- name: Upload built artifacts for testing
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.dists-artifact-name }}
path: |
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.dists-artifact-name }}
path: dist
Expand All @@ -72,7 +72,7 @@ jobs:
setup.py
requirements/lint.txt
- name: Install dependencies
uses: py-actions/py-dependency-install@v2
uses: py-actions/py-dependency-install@v4
with:
path: requirements/lint.txt
- uses: actions/cache@v4
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
setup.py
requirements/test.txt
- name: Install dependencies
uses: py-actions/py-dependency-install@v2
uses: py-actions/py-dependency-install@v4
with:
path: requirements/test.txt
- name: Start Docker services
Expand All @@ -130,10 +130,16 @@ jobs:
DOCKER_VERSION: ${{ matrix.docker }}
run: |
python -m pytest -vv --durations=10 ${{ matrix.pytest-arg }}
- name: Rename coverage logs
run: |
mv coverage.xml "coverage-unit-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.registry }}.xml"
- name: Upload coverage artifact
uses: neuro-inc/[email protected]
uses: actions/upload-artifact@v4
with:
key: unit-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.cmd }}-${{ matrix.registry }}
name: coverage-unit-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.registry }}
path: coverage-unit-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.registry }}.xml
if-no-files-found: error
retention-days: 1

check: # This job does nothing and is only used for the branch protection
name: ✅ Ensure the required checks passing
Expand All @@ -151,10 +157,17 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Download coverage artifact
uses: actions/download-artifact@v4
with:
pattern: coverage-unit-*
path: coverage
merge-multiple: true
- name: Upload code coverage report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: coverage

publish: # Run only on creating release for new tag
name: 📦 Publish to PyPI
Expand All @@ -175,7 +188,7 @@ jobs:
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.dists-artifact-name }}
path: dist
Expand Down

0 comments on commit bf1a2ca

Please sign in to comment.