GH Action for generating reports in CI (#32375)

Added: CI job to upload API test reports on PR events.
This commit is contained in:
rodelgc 2022-04-01 10:24:09 +08:00 committed by GitHub
parent e32e410f62
commit 989f50daa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -149,6 +149,15 @@ jobs:
USER_SECRET: password
run: pnpx wc-api-tests test api
- name: Upload API test report
uses: actions/upload-artifact@v2
with:
name: api-test-report---pr-${{ github.event.number }}
path: |
package/woocommerce/packages/js/api-core-tests/allure-results
package/woocommerce/packages/js/api-core-tests/allure-report
retention-days: 7
k6-tests-run:
name: Runs k6 Performance tests
runs-on: ubuntu-18.04

View File

@ -35,7 +35,7 @@ report() {
REPORT_EXIT_CODE=$?
# Suggest opening the report
if [ $REPORT_EXIT_CODE -eq 0 ]; then
if [[ $REPORT_EXIT_CODE -eq 0 && $GITHUB_ACTIONS != "true" ]]; then
echo "To view the report on your browser, run:"
echo ""
echo "pnpx allure open \"$ALLURE_REPORT_DIR\""