Skip to content

Commit

Permalink
test: fix env vars in scheduled runs (GoogleCloudPlatform#3459)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
kweinmeister and pattishin authored Aug 16, 2023
1 parent 6d4b796 commit b579864
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v3.5.3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
- run: npm install
- run: npm run lint
docs:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,17 @@ jobs:
- name: install directory dependencies
run: npm install
- run: npm run build --if-present
- name: set env vars for scheduled run
- name: set testing env vars
run: echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
- name: set testing env vars for scheduled run
if: github.event.action == 'schedule'
run: |
echo "MOCHA_REPORTER_SUITENAME=${{ inputs.name }}" >> $GITHUB_ENV
echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
- run: npm test
- name: upload test results for FlakyBot workflow
if: github.event.action == 'schedule' && always()
uses: actions/upload-artifact@v3
env:
MOCHA_REPORTER_OUTPUT: "${{github.run_id}}_sponge_log.xml"
with:
name: test-results
path: ${{ inputs.path }}/${{ env.MOCHA_REPORTER_OUTPUT }}
Expand Down

0 comments on commit b579864

Please sign in to comment.