-
Notifications
You must be signed in to change notification settings - Fork 439
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/more-pip-fixes-and-cicd' into sweep/replace_the_uv…
…_install_section_in_the_do
- Loading branch information
Showing
13 changed files
with
292 additions
and
218 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Python CI All | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
# paths: | ||
# - 'sweepai/**' | ||
# - 'tests/**' | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
paths: | ||
- 'sweepai/**' | ||
- 'tests/**' | ||
|
||
jobs: | ||
python-ci: | ||
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 }} | ||
- name: Restore dependencies | ||
id: restore-dependencies | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: "~" | ||
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-python-${{ matrix.python-version }}- | ||
${{ runner.os }}-python- | ||
- run: echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV | ||
if: steps.restore-dependencies.outputs.cache-hit != 'true' | ||
- run: pip install uv | ||
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: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: "~" | ||
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} | ||
|
||
- name: Format with Black | ||
run: black sweepai | ||
|
||
- name: Lint with Ruff | ||
run: ruff check sweepai | ||
|
||
- name: Lint with Pylint | ||
run: pylint sweepai --errors-only | ||
|
||
- name: Run Unit Tests | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
run: python -m unittest sweepai/**/*_test.py | ||
|
||
- name: Set up Redis (for e2e tests) | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install redis-server | ||
sudo lsof -i :6379 || true | ||
- name: Run e2e Tests | ||
env: | ||
GITHUB_PAT: ${{ secrets.GH_PAT }} | ||
GITHUB_APP_ID: ${{ secrets.GH_APP_ID }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
GITHUB_APP_PEM: ${{ secrets.GH_APP_PEM }} | ||
OPENAI_API_TYPE: azure | ||
OPENAI_API_BASE: ${{ secrets.GH_OPENAI_API_BASE }} | ||
OPENAI_API_VERSION: 2024-02-15-preview | ||
AZURE_API_KEY: ${{ secrets.GH_AZURE_API_KEY }} | ||
AZURE_OPENAI_DEPLOYMENT: ${{ secrets.GH_AZURE_OPENAI_DEPLOYMENT }} | ||
run: PYTHONPATH=. pytest -n 4 tests/e2e -s | ||
timeout-minutes: 30 |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ Homepage = "https://sweep.dev" | |
|
||
[project] | ||
name = "sweepai" | ||
version = "1.0.12" | ||
version = "1.1.0" | ||
description = "Sweep fixes GitHub issues" | ||
authors = [ | ||
{name = "Kevin Lu", email = "[email protected]"}, | ||
|
Oops, something went wrong.