Skip to content

Commit

Permalink
fix: upload test results only on main push (#396)
Browse files Browse the repository at this point in the history
* upload test result only on main push

* forgot to add check to last step
  • Loading branch information
ykim-1 committed Oct 5, 2023
1 parent 96af46f commit cb9a279
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
SKIP_LINT: 1

- name: Convert JSON Report to XML
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
filename=$(ls | grep -E '^[0-9]{12}_linodego_test_report\.json')
Expand All @@ -76,6 +77,7 @@ jobs:
GO111MODULE: on

- name: Add additional information to XML report
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
filename=$(ls | grep -E '^[0-9]{12}_linodego_test_report\.xml$')
python scripts/add_to_xml_test_report.py \
Expand All @@ -85,6 +87,7 @@ jobs:
--xmlfile "${filename}"
- name: Upload test results to bucket
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}
Expand Down

0 comments on commit cb9a279

Please sign in to comment.