-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix-copier-error-with-python2
- Loading branch information
Showing
114 changed files
with
6,090 additions
and
4,385 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 |
---|---|---|
@@ -1,6 +1,14 @@ | ||
# Domain | ||
# This would be set to the production domain with an env var on deployment | ||
# used by Traefik to transmit traffic and aqcuire TLS certificates | ||
DOMAIN=localhost | ||
# To test the local Traefik config | ||
# DOMAIN=localhost.tiangolo.com | ||
|
||
# Used by the backend to generate links in emails to the frontend | ||
FRONTEND_HOST=http://localhost:5173 | ||
# In staging and production, set this env var to the frontend host, e.g. | ||
# FRONTEND_HOST=https://dashboard.example.com | ||
|
||
# Environment: local, staging, production | ||
ENVIRONMENT=local | ||
|
@@ -13,7 +21,6 @@ BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,h | |
SECRET_KEY=changethis | ||
FIRST_SUPERUSER=[email protected] | ||
FIRST_SUPERUSER_PASSWORD=changethis | ||
USERS_OPEN_REGISTRATION=False | ||
|
||
# Emails | ||
SMTP_HOST= | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ contact_links: | |
about: Please report security vulnerabilities to [email protected] | ||
- name: Question or Problem | ||
about: Ask a question or ask about a problem in GitHub Discussions. | ||
url: https://github.com/tiangolo/full-stack-fastapi-template/discussions/categories/questions | ||
url: https://github.com/fastapi/full-stack-fastapi-template/discussions/categories/questions | ||
- name: Feature Request | ||
about: To suggest an idea or ask about a feature, please start with a question saying what you would like to achieve. There might be a way to do it already. | ||
url: https://github.com/tiangolo/full-stack-fastapi-template/discussions/categories/questions | ||
url: https://github.com/fastapi/full-stack-fastapi-template/discussions/categories/questions |
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
version: 2 | ||
updates: | ||
# GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: "daily" | ||
interval: daily | ||
commit-message: | ||
prefix: ⬆ | ||
# Python | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: "daily" | ||
interval: daily | ||
commit-message: | ||
prefix: ⬆ |
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,25 @@ | ||
docs: | ||
- all: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '**/*.md' | ||
- all-globs-to-all-files: | ||
- '!frontend/**' | ||
- '!backend/**' | ||
- '!.github/**' | ||
- '!scripts/**' | ||
- '!.gitignore' | ||
- '!.pre-commit-config.yaml' | ||
|
||
internal: | ||
- all: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- .github/** | ||
- scripts/** | ||
- .gitignore | ||
- .pre-commit-config.yaml | ||
- all-globs-to-all-files: | ||
- '!./**/*.md' | ||
- '!frontend/**' | ||
- '!backend/**' |
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,18 @@ | ||
name: Add to Project | ||
|
||
on: | ||
pull_request_target: | ||
issues: | ||
types: | ||
- opened | ||
- reopened | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
project-url: https://github.com/orgs/fastapi/projects/2 | ||
github-token: ${{ secrets.PROJECTS_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Generate Client | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
jobs: | ||
generate-client: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.FULL_STACK_FASTAPI_TEMPLATE_REPO_TOKEN }} | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: "0.4.15" | ||
enable-cache: true | ||
- name: Install dependencies | ||
run: npm ci | ||
working-directory: frontend | ||
- run: uv sync | ||
working-directory: backend | ||
- run: uv run bash scripts/generate-client.sh | ||
env: | ||
VIRTUAL_ENV: backend/.venv | ||
- name: Commit changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "github-actions" | ||
git add frontend/src/client | ||
git diff --staged --quiet || git commit -m "✨ Autogenerate frontend client" | ||
git push |
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 |
---|---|---|
|
@@ -2,27 +2,42 @@ name: Issue Manager | |
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
- cron: "21 17 * * *" | ||
issue_comment: | ||
types: | ||
- created | ||
- edited | ||
issues: | ||
types: | ||
- labeled | ||
pull_request_target: | ||
types: | ||
- labeled | ||
workflow_dispatch: | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
issue-manager: | ||
if: github.repository_owner == 'fastapi' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- uses: tiangolo/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
config: > | ||
{ | ||
"answered": { | ||
"users": ["tiangolo"], | ||
"delay": 864000, | ||
"message": "Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues." | ||
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs." | ||
}, | ||
"waiting": { | ||
"delay": 2628000, | ||
"message": "As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR." | ||
} | ||
} |
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,31 @@ | ||
name: Labels | ||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
# For label-checker | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
labeler: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v5 | ||
# Run this after labeler applied labels | ||
check-labels: | ||
needs: | ||
- labeler | ||
permissions: | ||
pull-requests: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -12,9 +12,9 @@ on: | |
description: PR number | ||
required: true | ||
debug_enabled: | ||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)" | ||
required: false | ||
default: 'false' | ||
default: "false" | ||
|
||
jobs: | ||
latest-changes: | ||
|
@@ -30,12 +30,11 @@ jobs: | |
with: | ||
# To allow latest-changes to commit to the main branch | ||
token: ${{ secrets.LATEST_CHANGES }} | ||
- uses: docker://tiangolo/latest-changes:0.3.0 | ||
# - uses: tiangolo/latest-changes@main | ||
- uses: tiangolo/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
latest_changes_file: ./release-notes.md | ||
latest_changes_header: '## Latest Changes' | ||
end_regex: '^## ' | ||
latest_changes_header: "## Latest Changes" | ||
end_regex: "^## " | ||
debug_logs: true | ||
label_header_prefix: '### ' | ||
label_header_prefix: "### " |
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,28 @@ | ||
name: Lint Backend | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
jobs: | ||
lint-backend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: "0.4.15" | ||
enable-cache: true | ||
- run: uv run bash scripts/lint.sh | ||
working-directory: backend |
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,67 @@ | ||
name: Playwright Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
workflow_dispatch: | ||
inputs: | ||
debug_enabled: | ||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
required: false | ||
default: 'false' | ||
|
||
jobs: | ||
|
||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Setup tmate session | ||
uses: mxschmitt/action-tmate@v3 | ||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }} | ||
with: | ||
limit-access-to-actor: true | ||
- name: Install dependencies | ||
run: npm ci | ||
working-directory: frontend | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
working-directory: frontend | ||
- run: docker compose build | ||
- run: docker compose down -v --remove-orphans | ||
- run: docker compose up -d --wait backend mailcatcher | ||
- name: Run Playwright tests | ||
run: npx playwright test --fail-on-flaky-tests --trace=retain-on-failure | ||
working-directory: frontend | ||
- run: docker compose down -v --remove-orphans | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: frontend/playwright-report/ | ||
retention-days: 30 | ||
include-hidden-files: true | ||
|
||
# https://github.com/marketplace/actions/alls-green#why | ||
e2e-alls-green: # This job does nothing and is only used for the branch protection | ||
if: always() | ||
needs: | ||
- test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
Oops, something went wrong.