-
Notifications
You must be signed in to change notification settings - Fork 4k
44 lines (41 loc) · 1.27 KB
/
cdk-codeflash.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Run Codeflash on CDK PR
on:
pull_request:
paths:
- airbyte-cdk/python/airbyte_cdk/**
workflow_dispatch:
defaults:
run:
working-directory: ./airbyte-cdk/python/airbyte_cdk
jobs:
optimize:
name:
Optimize new code in this PR
# Only run codeflash if
# 1. The contributor is not codeflash. To avoid infinite loops
# 2. The pull request is not from a forked repository
if: ${{ github.actor != 'codeflash-ai[bot]' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork != true}}
runs-on: ubuntu-latest
env:
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
CODEFLASH_PR_NUMBER: ${{ github.event.number }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Airbyte CDK
id: install-airbyte-cdk
run: |
pip install --upgrade pip
pip install poetry
poetry install --all-extras --with dev
- name: Run Codeflash to optimize code
id: optimize_code
run: |
poetry env use python
poetry run codeflash