-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat: add uv and update github actions
- Loading branch information
Showing
5 changed files
with
1,000 additions
and
75 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -11,35 +11,28 @@ on: | |
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: pytest | ||
env: | ||
SECRET_KEY: 21290asdkja | ||
DEBUG: True | ||
DATABASE_URL: sqlite:///test.db | ||
ENV: local | ||
ALLOWED_HOSTS: localhost | ||
SENDGRID_API_KEY: 123 | ||
FROM_EMAIL: [email protected] | ||
ADMIN_USERS: pybites | ||
CELERY_BROKER_URL: amqp://guest:guest@localhost | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
|
||
- name: Set up Python | ||
run: uv python install 3.12 | ||
|
||
- name: Install the project | ||
run: uv sync | ||
|
||
- name: Run tests | ||
run: uv run pytest | ||
env: | ||
SECRET_KEY: 21290asdkja | ||
DEBUG: True | ||
DATABASE_URL: sqlite:///test.db | ||
ENV: local | ||
ALLOWED_HOSTS: localhost | ||
SENDGRID_API_KEY: 123 | ||
FROM_EMAIL: [email protected] | ||
ADMIN_USERS: pybites | ||
CELERY_BROKER_URL: amqp://guest:guest@localhost |
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 |
---|---|---|
|
@@ -16,3 +16,4 @@ sendgrid==6.9.7 | |
sentry-sdk==2.8.0 | ||
toml==0.10.2 | ||
whitenoise==6.2.0 | ||
pre_commit==4.0.0 |
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
Oops, something went wrong.