Skip to content

Commit

Permalink
Update GitHub actions versions (streamlit#8689)
Browse files Browse the repository at this point in the history
## Describe your changes

Update our GitHub actions versions to fix the deprecation warning.

With `actions/upload-artifact@v4`, multiple jobs cannot upload to the
same folder anymore. Hence, I have updated the flows according to [this
migration
guide](https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#multiple-uploads-to-the-same-named-artifact).
See also this discussion:
actions/upload-artifact#478

The workflows for cypress are kept on `v3` according to [this
comment](streamlit#8689 (review))
to keep the usage of it simple until we retire it soonish.

## GitHub Issue Link (if applicable)

## Testing Plan

- if the CI workflows run through, we should be all good

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.
  • Loading branch information
raethlein authored and benjamin-awd committed Sep 29, 2024
1 parent 172c964 commit 9dbe5bc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/actions/make_init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
steps:
- name: Restore pre-commit cache
id: cache-pre-commit
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: v1-pre-commit-${{ env.pythonLocation }}-${{ hashFiles('**/.pre-commit-config.yaml') }}
Expand All @@ -23,7 +23,7 @@ runs:
pre-commit install-hooks
shell: bash --login -eo pipefail {0}
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
Expand Down Expand Up @@ -75,7 +75,7 @@ runs:
- if: inputs.use_cached_venv == 'true'
name: Restore virtualenv from cache
id: cache-virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: venv
key: v1-python-venv-${{ hashFiles('**/python_cache_key.md5') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ jobs:
sudo apt install rsync
make package
- name: Store Whl File
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: whl_file
path: lib/dist/*.whl
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
sudo apt install rsync
BUILD_AS_FAST_AS_POSSIBLE=1 make package
- name: Store Whl File
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: whl_file
path: lib/dist/*.whl
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/python-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ jobs:
CONSTRAINT_URL="https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${CONSTRAINTS_BRANCH}/constraints-${PYTHON_VERSION}.txt"
diff -y <(echo "Old"; curl -s "${CONSTRAINT_URL}") <(echo "New"; cat "${CONSTRAINTS_FILE}") || true
- name: Upload constraints file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: constraints
name: constraints-${{ matrix.python_version }}
path: ${{ env.CONSTRAINTS_FILE }}
if-no-files-found: error

Expand Down Expand Up @@ -164,10 +164,11 @@ jobs:
# later git commands can work.
persist-credentials: true

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: constraints
path: .
pattern: constraints-*
merge-multiple: true

- name: Commit and push constraint files
run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
sudo apt install rsync
make package
- name: Store Package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Release
path: lib/dist
Expand All @@ -138,10 +138,11 @@ jobs:
# later git commands can work.
persist-credentials: true
path: constraints
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: constraints
path: constraints
pattern: constraints-*
merge-multiple: true
- name: Commit and push constraint files as tag
run: |
cd constraints;
Expand Down

0 comments on commit 9dbe5bc

Please sign in to comment.