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

Upgrade upload-artifact and download-artifact actions to v4 #2318

Merged
merged 4 commits into from
Jan 5, 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
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/[email protected]
uses: actions/[email protected]
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/[email protected]
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.
Loading