File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 run : |
4545 echo "PR_NUMBER=${{ inputs.targetEnvironment }}" >> $GITHUB_ENV
4646
47- - name : Run test - ${{ inputs.testType }}
47+ - name : Run component tests
4848 shell : bash
4949 run : |
50- make test-${{ inputs.testType }}
50+ make test-component
51+
52+ - name : Check if e2e tests should run
53+ id : check_e2e
54+ shell : bash
55+ env :
56+ GITHUB_TOKEN : ${{ env.GITHUB_TOKEN }}
57+ run : |
58+ # Extract PR number from environment name (e.g., pr123 -> 123)
59+ if [[ "${{ inputs.targetEnvironment }}" =~ ^pr([0-9]+)$ ]]; then
60+ pr_number="${BASH_REMATCH[1]}"
61+ labels=$(gh pr view "$pr_number" --json labels --jq '.labels[].name' 2>/dev/null || echo "")
62+
63+ if echo "$labels" | grep -Fxq 'deploy-proxy'; then
64+ echo "deploy-proxy label found; e2e tests will run."
65+ echo "run_e2e=true" >> $GITHUB_OUTPUT
66+ else
67+ echo "deploy-proxy label not found; e2e tests will be skipped."
68+ echo "run_e2e=false" >> $GITHUB_OUTPUT
69+ fi
70+ else
71+ echo "Not a PR environment; e2e tests will run."
72+ echo "run_e2e=true" >> $GITHUB_OUTPUT
73+ fi
74+
75+ - name : Run e2e tests
76+ if : steps.check_e2e.outputs.run_e2e == 'true'
77+ shell : bash
78+ run : |
79+ make .internal-dev-test
Original file line number Diff line number Diff line change 11[
2- " component "
2+ " acceptance "
33]
You can’t perform that action at this time.
0 commit comments