Fix TypeScript module system detection in CommonJS packages #189
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E - Java Tracer | |
| on: | |
| pull_request: | |
| paths: | |
| - 'codeflash/**' | |
| - 'codeflash-java-runtime/**' | |
| - 'tests/**' | |
| - '.github/workflows/e2e-java-tracer.yaml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| java-tracer-e2e: | |
| environment: ${{ (github.event_name == 'workflow_dispatch' || (contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && github.event.pull_request.user.login != 'misrasaurabh1' && github.event.pull_request.user.login != 'KRRT7')) && 'external-trusted-contributors' || '' }} | |
| runs-on: ubuntu-latest | |
| env: | |
| CODEFLASH_AIS_SERVER: prod | |
| POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | |
| CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }} | |
| COLUMNS: 110 | |
| MAX_RETRIES: 3 | |
| RETRY_DELAY: 5 | |
| EXPECTED_IMPROVEMENT_PCT: 10 | |
| CODEFLASH_END_TO_END: 1 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Validate PR | |
| env: | |
| PR_AUTHOR: ${{ github.event.pull_request.user.login }} | |
| PR_STATE: ${{ github.event.pull_request.state }} | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| run: | | |
| if git diff --name-only "$BASE_SHA" "$HEAD_SHA" | grep -q "^.github/workflows/"; then | |
| echo "⚠️ Workflow changes detected." | |
| echo "PR Author: $PR_AUTHOR" | |
| if [[ "$PR_AUTHOR" == "misrasaurabh1" || "$PR_AUTHOR" == "KRRT7" ]]; then | |
| echo "✅ Authorized user ($PR_AUTHOR). Proceeding." | |
| elif [[ "$PR_STATE" == "open" ]]; then | |
| echo "✅ PR is open. Proceeding." | |
| else | |
| echo "⛔ Unauthorized user ($PR_AUTHOR) attempting to modify workflows. Exiting." | |
| exit 1 | |
| fi | |
| else | |
| echo "✅ No workflow file changes detected. Proceeding." | |
| fi | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Set up Python 3.11 for CLI | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: 3.11.6 | |
| - name: Install dependencies (CLI) | |
| run: uv sync | |
| - name: Build codeflash-runtime JAR | |
| run: | | |
| cd codeflash-java-runtime | |
| mvn clean package -q -DskipTests | |
| mvn install -q -DskipTests | |
| - name: Verify Java installation | |
| run: | | |
| java -version | |
| mvn --version | |
| - name: Run Java tracer e2e test | |
| run: | | |
| uv run python tests/scripts/end_to_end_test_java_tracer.py |