GH Action for generating reports in CI (#32375)
Added: CI job to upload API test reports on PR events.
This commit is contained in:
parent
e32e410f62
commit
989f50daa3
|
@ -149,6 +149,15 @@ jobs:
|
||||||
USER_SECRET: password
|
USER_SECRET: password
|
||||||
run: pnpx wc-api-tests test api
|
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:
|
k6-tests-run:
|
||||||
name: Runs k6 Performance tests
|
name: Runs k6 Performance tests
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
|
@ -35,7 +35,7 @@ report() {
|
||||||
REPORT_EXIT_CODE=$?
|
REPORT_EXIT_CODE=$?
|
||||||
|
|
||||||
# Suggest opening the report
|
# 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 "To view the report on your browser, run:"
|
||||||
echo ""
|
echo ""
|
||||||
echo "pnpx allure open \"$ALLURE_REPORT_DIR\""
|
echo "pnpx allure open \"$ALLURE_REPORT_DIR\""
|
||||||
|
|
Loading…
Reference in New Issue