3939 permissions :
4040 contents : ' read'
4141 id-token : ' write'
42- defaults :
43- run :
44- working-directory : ' ai-platform/snippets'
4542 steps :
4643 - uses : actions/checkout@v4.1.0
4744 with :
@@ -64,30 +61,26 @@ jobs:
6461 - name : Get npm cache directory
6562 id : npm-cache-dir
6663 shell : bash
67- run : echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
64+ run : echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
6865 - uses : actions/cache@v3
6966 id : npm-cache
7067 with :
7168 path : ${{ steps.npm-cache-dir.outputs.dir }}
7269 key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
7370 restore-keys : |
7471 ${{ runner.os }}-node-
75- - name : install repo dependencies
76- run : npm install
77- working-directory : .
78- - name : install directory dependencies
79- run : npm install
80- - run : npm run build --if-present
8172 - name : set env vars for scheduled run
8273 if : github.event.action == 'schedule'
8374 run : |
8475 echo "MOCHA_REPORTER_SUITENAME=ai-platform-snippets" >> $GITHUB_ENV
8576 echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
8677 echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
87- - run : npm test
78+ - name : Run Tests
79+ run : make test dir=ai-platform/snippets
8880 env :
81+ GOOGLE_SAMPLES_PROJECT : " long-door-651"
8982 LOCATION : ${{ steps.secrets.outputs.location }}
90- CAIP_PROJECT_ID : ${{ steps.secrets.outputs.caip_id }}
83+ CAIP_PROJECT_ID : ${{ steps.secrets.outputs.caip_id }}
9184 - name : upload test results for FlakyBot workflow
9285 if : github.event.action == 'schedule' && always()
9386 uses : actions/upload-artifact@v3
9689 with :
9790 name : test-results
9891 path : ai-platform/snippets/${{ env.MOCHA_REPORTER_OUTPUT }}
99- retention-days : 1
92+ retention-days : 1
10093 flakybot :
10194 permissions :
10295 contents : ' read'
0 commit comments