Skip to content

Commit

Permalink
Upgrade upload-artifact and download-artifact actions to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 committed Jan 3, 2024
1 parent e772f7d commit 6e1444d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
# we just want the dev extras so we have a known version of tox and coverage
python -m pip install ./core[dev]
- name: Get packages
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.0
with:
name: ${{ needs.package.outputs.artifact-name }}
- name: Test
Expand All @@ -94,9 +94,9 @@ jobs:
TOGA_INSTALL_COMMAND="python -m pip install ../$(ls core/dist/toga_core-*.whl)[dev] ../$(ls dummy/dist/toga_dummy-*.whl)" tox -e py
mv core/.coverage core/.coverage.${{ matrix.platform }}.${{ matrix.python-version }}
- name: Store coverage data
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
with:
name: core-coverage-data
name: core-coverage-data-${{ matrix.platform }}-${{ matrix.python-version }}
path: "core/.coverage.*"
if-no-files-found: error

Expand All @@ -118,22 +118,23 @@ jobs:
# we just want the dev extras so we have a known version of coverage
python -m pip install ./core[dev]
- name: Retrieve coverage data
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.0
with:
name: core-coverage-data
pattern: core-coverage-data-*
path: core
merge-multiple: true
- name: Generate coverage report
run: |
cd core
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
python -m coverage report --rcfile ../pyproject.toml --fail-under=100
- name: Upload HTML report if check failed.
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
if: failure()
with:
name: html-coverage-report
path: core/htmlcov
if: ${{ failure() }}

testbed:
runs-on: ${{ matrix.runs-on }}
Expand Down Expand Up @@ -229,7 +230,7 @@ jobs:
run: ${{ matrix.briefcase-run-prefix }} briefcase run ${{ matrix.backend }} --test ${{ matrix.briefcase-run-args }}

- name: Upload logs
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
if: failure()
with:
name: testbed-failure-logs-${{ matrix.backend }}
Expand All @@ -242,7 +243,7 @@ jobs:
cp -r "${{ matrix.app-user-data-path }}" testbed/app_data/testbed-app_data-${{ matrix.backend }}
- name: Upload app data
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
if: failure() && matrix.backend != 'android'
with:
name: testbed-failure-app-data-${{ matrix.backend }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Get packages
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.0
with:
name: ${{ needs.ci.outputs.artifact-name }}

Expand Down
1 change: 1 addition & 0 deletions changes/2318.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The ``upload-artifact`` and ``download-artifact`` CI actions were upgraded to v4.

0 comments on commit 6e1444d

Please sign in to comment.