Skip to content

Commit b579864

Browse files
test: fix env vars in scheduled runs (GoogleCloudPlatform#3459)
* test: fix flakybot file upload step * update env vars * revert scheduler change * temp change for testing * test change to trigger workflow * revert test changes * including node 16 update to CI workflow --------- Co-authored-by: Patti Shin <pattishin@users.noreply.github.com>
1 parent 6d4b796 commit b579864

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v3.5.3
2929
- uses: actions/setup-node@v3
3030
with:
31-
node-version: 14
31+
node-version: 16
3232
- run: npm install
3333
- run: npm run lint
3434
docs:

.github/workflows/test.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,17 @@ jobs:
6363
- name: install directory dependencies
6464
run: npm install
6565
- run: npm run build --if-present
66-
- name: set env vars for scheduled run
66+
- name: set testing env vars
67+
run: echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
68+
- name: set testing env vars for scheduled run
6769
if: github.event.action == 'schedule'
6870
run: |
6971
echo "MOCHA_REPORTER_SUITENAME=${{ inputs.name }}" >> $GITHUB_ENV
70-
echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
7172
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
7273
- run: npm test
7374
- name: upload test results for FlakyBot workflow
7475
if: github.event.action == 'schedule' && always()
7576
uses: actions/upload-artifact@v3
76-
env:
77-
MOCHA_REPORTER_OUTPUT: "${{github.run_id}}_sponge_log.xml"
7877
with:
7978
name: test-results
8079
path: ${{ inputs.path }}/${{ env.MOCHA_REPORTER_OUTPUT }}

0 commit comments

Comments
 (0)