Skip to content

Commit

Permalink
Build/Test Tools: Update 3rd-party GitHub Actions.
Browse files Browse the repository at this point in the history
This applies several updates to the following 3rd-party GitHub Actions:
- `actions/setup-node`
- `actions/cache`
- `actions/upload-artifact`
- `slackapi/slack-github-action`
- `codecov/codecov-action`.

See #61564.

git-svn-id: https://develop.svn.wordpress.org/trunk@59208 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
desrosj committed Oct 10, 2024
1 parent e9e9d29 commit f2a4205
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-coding-standards-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-coding-standards-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT

- name: Cache PHPCS scan cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: |
.cache/phpcs-src.json
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/reusable-end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -125,12 +125,13 @@ jobs:
run: npm run test:e2e

- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
name: failures-artifacts${{ inputs.LOCAL_SCRIPT_DEBUG && '-SCRIPT_DEBUG' || '' }}-${{ github.run_id }}
path: artifacts
if-no-files-found: ignore
include-hidden-files: true

- name: Ensure version-controlled files are not modified or deleted
run: git diff --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/reusable-javascript-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/reusable-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
run: echo "TARGET_SHA=$(git rev-parse HEAD^1)" >> $GITHUB_ENV

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -285,12 +285,13 @@ jobs:
run: npm run test:performance

- name: Archive artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
name: performance-artifacts${{ inputs.memcached && '-memcached' || '' }}-${{ github.run_id }}
path: artifacts
if-no-files-found: ignore
include-hidden-files: true

- name: Compare results
run: node ./tests/performance/compare-results.js ${{ runner.temp }}/summary.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-php-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT

- name: Cache PHP compatibility scan cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: .cache/phpcompat.json
key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-php-${{ inputs.php-version }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-phpunit-tests-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand All @@ -108,7 +108,7 @@ jobs:

- name: Cache Composer dependencies
if: ${{ env.COMPOSER_INSTALL == true }}
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
env:
cache-name: cache-composer-dependencies
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-phpunit-tests-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Install Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand All @@ -111,7 +111,7 @@ jobs:
run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
env:
cache-name: cache-composer-dependencies
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-phpunit-tests-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable-test-core-build-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
run: git diff --exit-code

- name: Upload ZIP as a GitHub Actions artifact
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: ${{ inputs.save-build || inputs.prepare-playground }}
with:
name: wordpress-build-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
Expand All @@ -117,7 +117,7 @@ jobs:
# Uploads the PR number as an artifact for the Pull Request Commenting workflow to download and then
# leave a comment detailing how to test the PR within WordPress Playground.
- name: Upload PR number as artifact
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: ${{ inputs.prepare-playground && github.repository == 'WordPress/wordpress-develop' && github.event_name == 'pull_request' }}
with:
name: pr-number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/slack-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:

steps:
- name: Post failure notifications to Slack
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
payload: ${{ needs.prepare.outputs.payload }}
env:
Expand All @@ -183,7 +183,7 @@ jobs:

steps:
- name: Post failure notifications to Slack
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
payload: ${{ needs.prepare.outputs.payload }}
env:
Expand All @@ -199,7 +199,7 @@ jobs:

steps:
- name: Post success notifications to Slack
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
payload: ${{ needs.prepare.outputs.payload }}
env:
Expand All @@ -215,7 +215,7 @@ jobs:

steps:
- name: Post cancelled notifications to Slack
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
payload: ${{ needs.prepare.outputs.payload }}
env:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-and-zip-default-themes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -189,11 +189,12 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Upload theme ZIP as an artifact
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
if-no-files-found: error
name: ${{ matrix.theme }}
path: src/wp-content/themes/${{ matrix.theme }}
if-no-files-found: error
include-hidden-files: true

slack-notifications:
name: Slack Notifications
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:

- name: Upload single site report to Codecov
if: ${{ ! matrix.multisite && matrix.format == 'clover' && github.event_name != 'pull_request' }}
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: wp-code-coverage-single-${{ github.sha }}${{ 'clover' == matrix.format && '.xml' || '' }}
Expand All @@ -160,7 +160,7 @@ jobs:

- name: Upload single site HTML report as artifact
if: ${{ ! matrix.multisite && matrix.format == 'html' }}
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: wp-code-coverage-single-${{ github.sha }}
path: wp-code-coverage-single-${{ github.sha }}
Expand All @@ -175,7 +175,7 @@ jobs:

- name: Upload multisite report to Codecov
if: ${{ matrix.multisite && matrix.format == 'clover' && github.event_name != 'pull_request' }}
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: wp-code-coverage-multisite-${{ github.sha }}${{ 'clover' == matrix.format && '.xml' || '' }}
Expand All @@ -184,7 +184,7 @@ jobs:

- name: Upload multisite HTML report as artifact
if: ${{ matrix.multisite && matrix.format == 'html' }}
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: wp-code-coverage-multisite-${{ github.sha }}
path: wp-code-coverage-multisite-${{ github.sha }}
Expand Down

0 comments on commit f2a4205

Please sign in to comment.