Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: install all dependencies through just pgai install #325

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,7 @@ jobs:
with:
python-version-file: "./projects/pgai/.python-version"

- name: Install dependencies
working-directory: ./projects/pgai
run: uv sync --all-extras

- name: Lint
run: just pgai lint

- name: Check Typing
run: just pgai type-check

- name: Check Formatting
run: just pgai format

- name: Run Tests
run: just pgai test
- name: CI pipeline. Install dependencies, run linters and formatters, execute tests and build the project",
run: just pgai ci
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}


- name: Build the pgai distributable and check artifacts
run: just pgai build
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
5 changes: 3 additions & 2 deletions projects/pgai/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ build:

# Install the wheel package locally
install:
@uv sync
@uv sync --all-extras
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if this is strictly correct, but AFAICT we don't have any optional dependencies at the moment anyway, so it's kind of moot.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesGuthrie we do need them, otherwise sqlachemy won't be installed, and you'll get an error when running tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aah, I see now. I had missed that we now do have an optional dependency.


# Remove the installed pgai package
uninstall:
Expand All @@ -51,7 +51,8 @@ type-check:
format:
@uv run ruff format --diff ./

ci: lint type-check format test build
# CI pipeline. Runs all recipes needed for ensuring the code is ready to be integrated. Triggered by GH Actions
ci: install lint type-check format test build

# Build Docker image with version tag
docker-build:
Expand Down
Loading