From d16c26da40c96704e24b43832d2f7057f586c415 Mon Sep 17 00:00:00 2001 From: lauren Date: Wed, 19 Mar 2025 17:22:40 -0400 Subject: [PATCH] [ci] Specify if-no-files-found on actions/upload-artifact@v4 (#32679) Defaults to warn, but since some steps require these artifacts to be uploaded we specify an error if its not found. Some other steps like playwright test-results are only uploaded on failure so it's okay to ignore. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32679). * #32680 * __->__ #32679 * #32678 --- .github/workflows/compiler_playground.yml | 1 + .github/workflows/devtools_regression_tests.yml | 5 +++++ .github/workflows/runtime_build_and_test.yml | 6 ++++++ .github/workflows/runtime_commit_artifacts.yml | 2 ++ 4 files changed, 14 insertions(+) diff --git a/.github/workflows/compiler_playground.yml b/.github/workflows/compiler_playground.yml index 0a2551ce3a..2ef9920c26 100644 --- a/.github/workflows/compiler_playground.yml +++ b/.github/workflows/compiler_playground.yml @@ -50,3 +50,4 @@ jobs: with: name: test-results path: compiler/apps/playground/test-results + if-no-files-found: ignore diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml index f8e5fefca9..399772cf83 100644 --- a/.github/workflows/devtools_regression_tests.yml +++ b/.github/workflows/devtools_regression_tests.yml @@ -47,6 +47,7 @@ jobs: with: name: build path: build + if-no-files-found: error build_devtools_and_process_artifacts: name: Build DevTools and process artifacts @@ -84,17 +85,20 @@ jobs: with: name: react-devtools path: build/devtools.tgz + if-no-files-found: error # Simplifies getting the extension for local testing - name: Archive chrome extension uses: actions/upload-artifact@v4 with: name: react-devtools-chrome-extension path: build/devtools/chrome-extension.zip + if-no-files-found: error - name: Archive firefox extension uses: actions/upload-artifact@v4 with: name: react-devtools-firefox-extension path: build/devtools/firefox-extension.zip + if-no-files-found: error run_devtools_tests_for_versions: name: Run DevTools tests for versions @@ -179,3 +183,4 @@ jobs: with: name: screenshots path: ./tmp/screenshots + if-no-files-found: warn diff --git a/.github/workflows/runtime_build_and_test.yml b/.github/workflows/runtime_build_and_test.yml index 1cb4875597..2ebe7ac5f3 100644 --- a/.github/workflows/runtime_build_and_test.yml +++ b/.github/workflows/runtime_build_and_test.yml @@ -302,6 +302,7 @@ jobs: with: name: _build_${{ matrix.worker_id }}_${{ matrix.release_channel }} path: build + if-no-files-found: error test_build: name: yarn test-build @@ -426,6 +427,7 @@ jobs: path: | ./build.tgz ./build2.tgz + if-no-files-found: error check_error_codes: name: Search build artifacts for unminified errors @@ -603,11 +605,13 @@ jobs: with: name: flight-playwright-report path: fixtures/flight/playwright-report + if-no-files-found: warn - name: Archive Flight fixture artifacts uses: actions/upload-artifact@v4 with: name: flight-test-results path: fixtures/flight/test-results + if-no-files-found: ignore # ----- DEVTOOLS ----- build_devtools_and_process_artifacts: @@ -655,6 +659,7 @@ jobs: with: name: react-devtools-${{ matrix.browser }}-extension path: build/devtools/${{ matrix.browser }}-extension.zip + if-no-files-found: error merge_devtools_artifacts: name: Merge DevTools artifacts @@ -767,3 +772,4 @@ jobs: with: name: sizebot-message path: sizebot-message.md + if-no-files-found: ignore diff --git a/.github/workflows/runtime_commit_artifacts.yml b/.github/workflows/runtime_commit_artifacts.yml index 03795b7d2d..ed97d51d98 100644 --- a/.github/workflows/runtime_commit_artifacts.yml +++ b/.github/workflows/runtime_commit_artifacts.yml @@ -170,10 +170,12 @@ jobs: with: name: compiled path: compiled/ + if-no-files-found: error - uses: actions/upload-artifact@v4 with: name: compiled-rn path: compiled-rn/ + if-no-files-found: error commit_www_artifacts: needs: download_artifacts