Skip to content

Commit c5fcbcb

Browse files
committed
Merge remote-tracking branch 'upstream/master' into added_paths_ignore_on_actions
2 parents 3098247 + 2e107b4 commit c5fcbcb

File tree

142 files changed

+13849
-9124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+13849
-9124
lines changed

.github/dependabot.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,35 @@ updates:
77
interval: daily
88
commit-message:
99
prefix:
10-
# Python
11-
- package-ecosystem: pip
10+
# Python uv
11+
- package-ecosystem: uv
12+
directory: /backend
13+
schedule:
14+
interval: weekly
15+
commit-message:
16+
prefix:
17+
# npm
18+
- package-ecosystem: npm
19+
directory: /frontend
20+
schedule:
21+
interval: weekly
22+
commit-message:
23+
prefix:
24+
ignore:
25+
- dependency-name: "@hey-api/openapi-ts"
26+
# Docker
27+
- package-ecosystem: docker
28+
directories:
29+
- /backend
30+
- /frontend
31+
schedule:
32+
interval: weekly
33+
commit-message:
34+
prefix:
35+
# Docker Compose
36+
- package-ecosystem: docker-compose
1237
directory: /
1338
schedule:
14-
interval: daily
39+
interval: weekly
1540
commit-message:
1641
prefix:

.github/workflows/deploy-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v5
3131
- run: docker compose -f docker-compose.yml --project-name ${{ secrets.STACK_NAME_PRODUCTION }} build
3232
- run: docker compose -f docker-compose.yml --project-name ${{ secrets.STACK_NAME_PRODUCTION }} up -d

.github/workflows/deploy-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v5
3131
- run: docker compose -f docker-compose.yml --project-name ${{ secrets.STACK_NAME_STAGING }} build
3232
- run: docker compose -f docker-compose.yml --project-name ${{ secrets.STACK_NAME_STAGING }} up -d
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "Conflict detector"
2+
on:
3+
push:
4+
pull_request_target:
5+
types: [synchronize]
6+
7+
jobs:
8+
main:
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check if PRs have merge conflicts
15+
uses: eps1lon/actions-label-merge-conflict@v3
16+
with:
17+
dirtyLabel: "conflicts"
18+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
19+
commentOnDirty: "This pull request has a merge conflict that needs to be resolved."

.github/workflows/generate-client.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
# For PRs from forks
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
3030
# For PRs from the same repo
31-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v5
3232
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
3333
with:
3434
ref: ${{ github.head_ref }}
3535
token: ${{ secrets.FULL_STACK_FASTAPI_TEMPLATE_REPO_TOKEN }}
36-
- uses: actions/setup-node@v4
36+
- uses: actions/setup-node@v5
3737
with:
3838
node-version: lts/*
39-
- uses: actions/setup-python@v5
39+
- uses: actions/setup-python@v6
4040
with:
4141
python-version: "3.10"
4242
- name: Install uv
43-
uses: astral-sh/setup-uv@v3
43+
uses: astral-sh/setup-uv@v6
4444
with:
4545
version: "0.4.15"
4646
enable-cache: true
@@ -52,6 +52,9 @@ jobs:
5252
- run: uv run bash scripts/generate-client.sh
5353
env:
5454
VIRTUAL_ENV: backend/.venv
55+
SECRET_KEY: just-for-generating-client
56+
POSTGRES_PASSWORD: just-for-generating-client
57+
FIRST_SUPERUSER_PASSWORD: just-for-generating-client
5558
- name: Add changes to git
5659
run: |
5760
git config --local user.email "[email protected]"

.github/workflows/issue-manager.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
env:
2828
GITHUB_CONTEXT: ${{ toJson(github) }}
2929
run: echo "$GITHUB_CONTEXT"
30-
- uses: tiangolo/issue-manager@0.5.1
30+
- uses: tiangolo/issue-manager@0.6.0
3131
with:
3232
token: ${{ secrets.GITHUB_TOKEN }}
3333
config: >
@@ -39,5 +39,9 @@ jobs:
3939
"waiting": {
4040
"delay": 2628000,
4141
"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."
42+
},
43+
"invalid": {
44+
"delay": 0,
45+
"message": "This was marked as invalid and will be closed now. If this is an error, please provide additional details."
4246
}
4347
}

.github/workflows/labeler.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
pull-requests: write
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/labeler@v5
19+
- uses: actions/labeler@v6
20+
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
21+
- run: echo "Done adding labels"
2022
# Run this after labeler applied labels
2123
check-labels:
2224
needs:

.github/workflows/latest-changes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
env:
2727
GITHUB_CONTEXT: ${{ toJson(github) }}
2828
run: echo "$GITHUB_CONTEXT"
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
3030
with:
3131
# To allow latest-changes to commit to the main branch
3232
token: ${{ secrets.LATEST_CHANGES }}
33-
- uses: tiangolo/latest-changes@0.3.1
33+
- uses: tiangolo/latest-changes@0.4.0
3434
with:
3535
token: ${{ secrets.GITHUB_TOKEN }}
3636
latest_changes_file: ./release-notes.md

.github/workflows/lint-backend.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ jobs:
4040
runs-on: ubuntu-latest
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@v5
4444
- name: Set up Python
45-
uses: actions/setup-python@v5
45+
uses: actions/setup-python@v6
4646
with:
4747
python-version: "3.10"
4848
- name: Install uv
49-
uses: astral-sh/setup-uv@v3
49+
uses: astral-sh/setup-uv@v6
5050
with:
5151
version: "0.4.15"
5252
enable-cache: true

.github/workflows/playwright.yml

Lines changed: 82 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,52 +42,116 @@ on:
4242
default: 'false'
4343

4444
jobs:
45+
changes:
46+
runs-on: ubuntu-latest
47+
# Set job outputs to values from filter step
48+
outputs:
49+
changed: ${{ steps.filter.outputs.changed }}
50+
steps:
51+
- uses: actions/checkout@v5
52+
# For pull requests it's not necessary to checkout the code but for the main branch it is
53+
- uses: dorny/paths-filter@v3
54+
id: filter
55+
with:
56+
filters: |
57+
changed:
58+
- backend/**
59+
- frontend/**
60+
- .env
61+
- docker-compose*.yml
62+
- .github/workflows/playwright.yml
4563
46-
test:
64+
test-playwright:
65+
needs:
66+
- changes
67+
if: ${{ needs.changes.outputs.changed == 'true' }}
4768
timeout-minutes: 60
4869
runs-on: ubuntu-latest
70+
strategy:
71+
matrix:
72+
shardIndex: [1, 2, 3, 4]
73+
shardTotal: [4]
74+
fail-fast: false
4975
steps:
50-
- uses: actions/checkout@v4
51-
- uses: actions/setup-node@v4
76+
- uses: actions/checkout@v5
77+
- uses: actions/setup-node@v5
5278
with:
5379
node-version: lts/*
54-
- uses: actions/setup-python@v5
80+
- uses: actions/setup-python@v6
5581
with:
5682
python-version: '3.10'
5783
- name: Setup tmate session
5884
uses: mxschmitt/action-tmate@v3
5985
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
6086
with:
6187
limit-access-to-actor: true
62-
- name: Install dependencies
63-
run: npm ci
64-
working-directory: frontend
65-
- name: Install Playwright Browsers
66-
run: npx playwright install --with-deps
88+
- name: Install uv
89+
uses: astral-sh/setup-uv@v6
90+
with:
91+
version: "0.4.15"
92+
enable-cache: true
93+
- run: uv sync
94+
working-directory: backend
95+
- run: npm ci
6796
working-directory: frontend
97+
- run: uv run bash scripts/generate-client.sh
98+
env:
99+
VIRTUAL_ENV: backend/.venv
68100
- run: docker compose build
69101
- run: docker compose down -v --remove-orphans
70-
- run: docker compose up -d --wait backend mailcatcher
71102
- name: Run Playwright tests
72-
run: npx playwright test --fail-on-flaky-tests --trace=retain-on-failure
73-
working-directory: frontend
103+
run: docker compose run --rm playwright npx playwright test --fail-on-flaky-tests --trace=retain-on-failure --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
74104
- run: docker compose down -v --remove-orphans
75-
- uses: actions/upload-artifact@v4
76-
if: always()
105+
- name: Upload blob report to GitHub Actions Artifacts
106+
if: ${{ !cancelled() }}
107+
uses: actions/upload-artifact@v4
108+
with:
109+
name: blob-report-${{ matrix.shardIndex }}
110+
path: frontend/blob-report
111+
include-hidden-files: true
112+
retention-days: 1
113+
114+
merge-playwright-reports:
115+
needs:
116+
- test-playwright
117+
- changes
118+
# Merge reports after playwright-tests, even if some shards have failed
119+
if: ${{ !cancelled() && needs.changes.outputs.changed == 'true' }}
120+
runs-on: ubuntu-latest
121+
steps:
122+
- uses: actions/checkout@v5
123+
- uses: actions/setup-node@v5
124+
with:
125+
node-version: 20
126+
- name: Install dependencies
127+
run: npm ci
128+
working-directory: frontend
129+
- name: Download blob reports from GitHub Actions Artifacts
130+
uses: actions/download-artifact@v5
131+
with:
132+
path: frontend/all-blob-reports
133+
pattern: blob-report-*
134+
merge-multiple: true
135+
- name: Merge into HTML Report
136+
run: npx playwright merge-reports --reporter html ./all-blob-reports
137+
working-directory: frontend
138+
- name: Upload HTML report
139+
uses: actions/upload-artifact@v4
77140
with:
78-
name: playwright-report
79-
path: frontend/playwright-report/
141+
name: html-report--attempt-${{ github.run_attempt }}
142+
path: frontend/playwright-report
80143
retention-days: 30
81144
include-hidden-files: true
82145

83146
# https://github.com/marketplace/actions/alls-green#why
84-
e2e-alls-green: # This job does nothing and is only used for the branch protection
147+
alls-green-playwright: # This job does nothing and is only used for the branch protection
85148
if: always()
86149
needs:
87-
- test
150+
- test-playwright
88151
runs-on: ubuntu-latest
89152
steps:
90153
- name: Decide whether the needed jobs succeeded or failed
91154
uses: re-actors/alls-green@release/v1
92155
with:
93156
jobs: ${{ toJSON(needs) }}
157+
allowed-skips: test-playwright

0 commit comments

Comments
 (0)