Skip to content

Commit

Permalink
Add codeflash.yml github action
Browse files Browse the repository at this point in the history
  • Loading branch information
fake-afik authored Dec 11, 2023
1 parent 13b3742 commit 953a6a7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/codeflash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CodeFlash

on:
pull_request:
workflow_dispatch:

jobs:
optimize:
name: Optimize new code in this PR
runs-on: ubuntu-latest
env:
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
CODEFLASH_AI_KEY: ${{ secrets.CODEFLASH_AI_KEY }}
PR_NUMBER: ${{ github.event.number }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run CodeFlash to optimize code
id: optimize_code
run: |
poetry env use python
poetry run codeflash --test-framework unittest --test-root code_to_optimize/tests/unittest

0 comments on commit 953a6a7

Please sign in to comment.