diff --git a/.github/workflows/ai-platform-snippets.yaml b/.github/workflows/ai-platform-snippets.yaml index f640028522..a48503062f 100644 --- a/.github/workflows/ai-platform-snippets.yaml +++ b/.github/workflows/ai-platform-snippets.yaml @@ -21,16 +21,16 @@ on: - 'ai-platform/snippets/**' - '.github/workflows/ai-platform-snippets.yaml' pull_request: - paths: - - 'ai-platform/snippets/**' - - '.github/workflows/ai-platform-snippets.yaml' - pull_request_target: - types: [labeled] + types: + - opened + - reopened + - synchronize + - labeled paths: - 'ai-platform/snippets/**' - '.github/workflows/ai-platform-snippets.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: if: github.event.action != 'labeled' || github.event.label.name == 'actions:force-run' @@ -67,8 +67,7 @@ jobs: with: path: ${{ steps.npm-cache-dir.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + restore-keys: "${{ runner.os }}-node- \n" - name: set env vars for scheduled run if: github.event.action == 'schedule' run: | diff --git a/.github/workflows/datacatalog-cloud-client.yaml b/.github/workflows/datacatalog-cloud-client.yaml index 06b4e41da8..a0baaf70fa 100644 --- a/.github/workflows/datacatalog-cloud-client.yaml +++ b/.github/workflows/datacatalog-cloud-client.yaml @@ -22,18 +22,17 @@ on: - '.github/workflows/datacatalog-cloud-client.yaml' - '.github/workflows/test.yaml' pull_request: - paths: - - 'datacatalog/cloud-client/**' - - '.github/workflows/datacatalog-cloud-client.yaml' - - '.github/workflows/test.yaml' - pull_request_target: - types: [labeled] + types: + - opened + - reopened + - synchronize + - labeled paths: - 'datacatalog/cloud-client/**' - '.github/workflows/datacatalog-cloud-client.yaml' - '.github/workflows/test.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: permissions: diff --git a/.github/workflows/datacatalog-quickstart.yaml b/.github/workflows/datacatalog-quickstart.yaml index ff689414bd..ff453ac5a2 100644 --- a/.github/workflows/datacatalog-quickstart.yaml +++ b/.github/workflows/datacatalog-quickstart.yaml @@ -22,18 +22,17 @@ on: - '.github/workflows/datacatalog-quickstart.yaml' - '.github/workflows/test.yaml' pull_request: - paths: - - 'datacatalog/quickstart/**' - - '.github/workflows/datacatalog-quickstart.yaml' - - '.github/workflows/test.yaml' - pull_request_target: - types: [labeled] + types: + - opened + - reopened + - synchronize + - labeled paths: - 'datacatalog/quickstart/**' - '.github/workflows/datacatalog-quickstart.yaml' - '.github/workflows/test.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: permissions: diff --git a/.github/workflows/datacatalog-snippets.yaml b/.github/workflows/datacatalog-snippets.yaml index 2dba3c61c2..28fa9d216d 100644 --- a/.github/workflows/datacatalog-snippets.yaml +++ b/.github/workflows/datacatalog-snippets.yaml @@ -22,18 +22,17 @@ on: - '.github/workflows/datacatalog-snippets.yaml' - '.github/workflows/test.yaml' pull_request: - paths: - - 'datacatalog/snippets/**' - - '.github/workflows/datacatalog-snippets.yaml' - - '.github/workflows/test.yaml' - pull_request_target: - types: [labeled] + types: + - opened + - reopened + - synchronize + - labeled paths: - 'datacatalog/snippets/**' - '.github/workflows/datacatalog-snippets.yaml' - '.github/workflows/test.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: permissions: diff --git a/.github/workflows/datalabeling.yaml b/.github/workflows/datalabeling.yaml index 9f338939a0..01bc348422 100644 --- a/.github/workflows/datalabeling.yaml +++ b/.github/workflows/datalabeling.yaml @@ -22,18 +22,17 @@ on: - '.github/workflows/datalabeling.yaml' - '.github/workflows/test.yaml' pull_request: - paths: - - 'datalabeling/**' - - '.github/workflows/datalabeling.yaml' - - '.github/workflows/test.yaml' - pull_request_target: - types: [labeled] + types: + - opened + - reopened + - synchronize + - labeled paths: - 'datalabeling/**' - '.github/workflows/datalabeling.yaml' - '.github/workflows/test.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: permissions: diff --git a/.github/workflows/dataproc.yaml b/.github/workflows/dataproc.yaml index 1eeff45570..88e47368b2 100644 --- a/.github/workflows/dataproc.yaml +++ b/.github/workflows/dataproc.yaml @@ -22,18 +22,17 @@ on: - '.github/workflows/dataproc.yaml' - '.github/workflows/test.yaml' pull_request: - paths: - - 'dataproc/**' - - '.github/workflows/dataproc.yaml' - - '.github/workflows/test.yaml' - pull_request_target: - types: [labeled] + types: + - opened + - reopened + - synchronize + - labeled paths: - 'dataproc/**' - '.github/workflows/dataproc.yaml' - '.github/workflows/test.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: permissions: diff --git a/.github/workflows/dlp.yaml b/.github/workflows/dlp.yaml index b21eb2ba64..8453ddf498 100644 --- a/.github/workflows/dlp.yaml +++ b/.github/workflows/dlp.yaml @@ -22,18 +22,17 @@ on: - '.github/workflows/dlp.yaml' - '.github/workflows/test.yaml' pull_request: - paths: - - 'dlp/**' - - '.github/workflows/dlp.yaml' - - '.github/workflows/test.yaml' - pull_request_target: - types: [labeled] + types: + - opened + - reopened + - synchronize + - labeled paths: - 'dlp/**' - '.github/workflows/dlp.yaml' - '.github/workflows/test.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: permissions: diff --git a/.github/workflows/generative-ai-snippets.yaml b/.github/workflows/generative-ai-snippets.yaml index a0b2d118b3..704bf44cee 100644 --- a/.github/workflows/generative-ai-snippets.yaml +++ b/.github/workflows/generative-ai-snippets.yaml @@ -21,16 +21,16 @@ on: - 'generative-ai/snippets/**' - '.github/workflows/generative-ai-snippets.yaml' pull_request: - paths: - - 'generative-ai/snippets/**' - - '.github/workflows/generative-ai-snippets.yaml' - pull_request_target: - types: [labeled] + types: + - opened + - reopened + - synchronize + - labeled paths: - 'generative-ai/snippets/**' - '.github/workflows/generative-ai-snippets.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: if: github.event.action != 'labeled' || github.event.label.name == 'actions:force-run' @@ -59,20 +59,19 @@ jobs: caip_id:nodejs-docs-samples-tests/nodejs-docs-samples-ai-platform-caip-project-id location:nodejs-docs-samples-tests/nodejs-docs-samples-ai-platform-location datastore_id:nodejs-docs-samples-tests/nodejs-docs-samples-ai-platform-datastore-id - - uses: actions/setup-node@v4.0.0 + - uses: actions/setup-node@v4.0.0 with: node-version: 18 - name: Get npm cache directory id: npm-cache-dir shell: bash - run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} + run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} - uses: actions/cache@v3 id: npm-cache with: path: ${{ steps.npm-cache-dir.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + restore-keys: "${{ runner.os }}-node- \n" - name: install repo dependencies run: npm install working-directory: . @@ -89,8 +88,8 @@ jobs: env: GOOGLE_SAMPLES_PROJECT: "long-door-651" LOCATION: ${{ steps.secrets.outputs.location }} - CAIP_PROJECT_ID: ${{ steps.secrets.outputs.caip_id }} - DATASTORE_ID: ${{ steps.secrets.outputs.datastore_id }} + CAIP_PROJECT_ID: ${{ steps.secrets.outputs.caip_id }} + DATASTORE_ID: ${{ steps.secrets.outputs.datastore_id }} - name: upload test results for FlakyBot workflow if: github.event.action == 'schedule' && always() uses: actions/upload-artifact@v3 @@ -99,7 +98,7 @@ jobs: with: name: test-results path: generative-ai/snippets/${{ env.MOCHA_REPORTER_OUTPUT }} - retention-days: 1 + retention-days: 1 flakybot: permissions: contents: 'read'