Paths cleanup #397
Workflow file for this run
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: end-to-end-test | |
| on: | |
| pull_request_target: | |
| workflow_dispatch: | |
| jobs: | |
| bubble-sort-optimization-unittest: | |
| environment: 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: 300 | |
| CODEFLASH_END_TO_END: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Validate PR | |
| run: | | |
| # Checking for any workflow changes for security risks | |
| if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^.github/workflows/"; then | |
| echo "Workflow changes detected." | |
| # Check if the PR author is allowed | |
| AUTHOR="${{ github.event.pull_request.user.login }}" | |
| if [[ "$AUTHOR" != "misrasaurabh1" && "$AUTHOR" != "KRRT7" ]]; then | |
| echo "Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting." | |
| exit 1 | |
| else | |
| echo "Authorized user ($AUTHOR). Proceeding." | |
| fi | |
| fi | |
| - name: Set up Python 3.11 for CLI | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: 3.11.6 | |
| - name: Install dependencies (CLI) | |
| run: | | |
| uv tool install poetry | |
| uv venv | |
| source .venv/bin/activate | |
| poetry install --with dev | |
| - name: Run Codeflash to optimize code | |
| id: optimize_code | |
| run: | | |
| source .venv/bin/activate | |
| poetry run python tests/scripts/end_to_end_test_bubblesort_unittest.py |