Skip to content

Commit

Permalink
Merge pull request #2318 from rmartin16/ci
Browse files Browse the repository at this point in the history
Upgrade `upload-artifact` and `download-artifact` actions to v4
  • Loading branch information
freakboy3742 authored Jan 5, 2024
2 parents e772f7d + 35a45ec commit d53a8af
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ 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 }}
pattern: ${{ needs.package.outputs.artifact-name }}-*
merge-multiple: true
- name: Test
run: |
# The $(ls ...) shell expansion is done in the Github environment;
Expand All @@ -94,9 +95,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 +119,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 +231,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 +244,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
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ 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 }}
pattern: ${{ needs.ci.outputs.artifact-name }}-*
merge-multiple: true

- name: Create release
uses: ncipollo/release-action@v1.13.0
Expand Down Expand Up @@ -64,9 +65,10 @@ jobs:
- "toga_winforms"
steps:
- name: Get packages
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.0
with:
name: ${{ needs.ci.outputs.artifact-name }}
pattern: ${{ needs.ci.outputs.artifact-name }}-*
merge-multiple: true

- name: Extract ${{ matrix.package }}
run: |
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 d53a8af

Please sign in to comment.