-
Notifications
You must be signed in to change notification settings - Fork 436
68 lines (65 loc) · 2 KB
/
review.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Python Review Pr Test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
- dev
paths:
- 'sweepai/**'
- 'tests/**'
push:
branches:
- main
- dev
paths:
- 'sweepai/**'
- 'tests/**'
jobs:
review-pr:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
# python-version: ["3.10", "3.11"]
os: [ubuntu-latest]
# outputs:
# cache-key: ${{ steps.cache-dependencies.outputs.cache-key }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.67.0
override: true
# - uses: Swatinem/rust-cache@v1
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# - run: echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV
# if: steps.restore-dependencies.outputs.cache-hit != 'true'
- run: |
pip install uv
uv venv
source .venv/bin/activate
echo ".venv/bin" >> $GITHUB_PATH
# if: steps.restore-dependencies.outputs.cache-hit != 'true'
- run: uv pip install -r requirements.txt
# if: steps.restore-dependencies.outputs.cache-hit != 'true'
- run: uv pip install ruff pylint pytest pytest-xdist black
# if: steps.restore-dependencies.outputs.cache-hit != 'true'
- name: Run Review Test
env:
LICENSE_KEY: ${{ secrets.LICENSE_KEY }}
GITHUB_PAT: ${{ secrets.GH_PAT }}
GITHUB_APP_ID: ${{ secrets.GH_APP_ID }}
GITHUB_APP_PEM: ${{ secrets.GH_APP_PEM }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
CACHE_DIRECTORY: /tmp
run: |
export PYTHONPATH=.
pytest tests/e2e/test_pr_review.py -s