-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support PEP 621 #266
Support PEP 621 #266
Changes from all commits
888bb56
907c444
f5968cb
f7f4d76
d4164da
cff05fc
2b87e8b
d7768c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Lint with ruff | ||
run: | | ||
pip install ruff | ||
ruff check python/ |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Set up uv | ||
run: curl -LsSf https://astral.sh/uv/install.sh | sh | ||
|
||
- name: Restore uv cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: /tmp/.uv-cache | ||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | ||
restore-keys: | | ||
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | ||
uv-${{ runner.os }} | ||
|
||
- name: Install Postgresql | ||
uses: ikalnytskyi/action-setup-postgres@v6 | ||
with: | ||
username: postgres | ||
id: postgres | ||
|
||
- name: Install dependencies | ||
run: | | ||
uv pip install --system -e .[dev] | ||
|
||
- name: Test with pytest | ||
run: | | ||
pytest -s | ||
env: | ||
PGSERVICE: ${{ steps.postgres.outputs.service-name }} | ||
Comment on lines
+34
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised the tests just worked with these additions. I can finally delete the outdated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I was also surprised that this was fairly simple. I also had to change the |
||
|
||
- name: Minimize uv cache | ||
run: uv cache prune --ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to split out build and test into two separate workflows? Or if not, split build and test into two separate jobs in this workflow?
Do we want to add any tag and release workflows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this new version there are 3 workflows: test, lint, and release. release (which builds the source and wheel packages and uploads them to PyPI) has been there for some time and I have not changed it here. The lint workflow is what it used to be called
pythonapp
. The test workflow is new and replaces the Travis setup.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that makes sense.