Skip to content

Commit 562c8b8

Browse files
Dev (#12)
* 合并 (#8) * chore: add comprehensive contributing guide (#10) * chore: add comprehensive contributing guide * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * ci: restore pr-check.yml workflow for dev branch - Restore backend and frontend PR checks - Enable Python syntax check and import test for backend - Enable pnpm build check for frontend - Fix 'Expected — Waiting for status to be reported' issue --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 72506ac commit 562c8b8

File tree

1 file changed

+3
-38
lines changed

1 file changed

+3
-38
lines changed

.github/workflows/pr-check.yml

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,76 +15,41 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v5
18-
19-
- name: Detect backend
20-
id: detect
21-
run: |
22-
if [ -f backend/pyproject.toml ]; then
23-
echo "exists=true" >> "$GITHUB_OUTPUT"
24-
else
25-
echo "exists=false" >> "$GITHUB_OUTPUT"
26-
fi
27-
28-
- name: Skip backend checks (no backend/)
29-
if: steps.detect.outputs.exists != 'true'
30-
run: echo "No backend/ found; skipping backend checks."
31-
3218
- name: Setup Python
33-
if: steps.detect.outputs.exists == 'true'
3419
uses: actions/setup-python@v5
3520
with:
3621
python-version: "3.11"
3722
cache: "pip"
3823
cache-dependency-path: backend/pyproject.toml
3924
- name: Install backend (editable)
40-
if: steps.detect.outputs.exists == 'true'
4125
run: |
4226
python -m pip install --upgrade pip
4327
pip install -e backend
4428
- name: Backend syntax check (compileall)
45-
if: steps.detect.outputs.exists == 'true'
4629
run: python -m compileall -q backend/app
4730
- name: Backend import smoke test
48-
if: steps.detect.outputs.exists == 'true'
4931
run: python -c "from app.main import app; print('backend app import: ok')"
5032

5133
frontend:
5234
if: github.event.pull_request.draft == false
5335
runs-on: ubuntu-latest
36+
defaults:
37+
run:
38+
working-directory: frontend
5439
steps:
5540
- uses: actions/checkout@v5
56-
57-
- name: Detect frontend
58-
id: detect
59-
run: |
60-
if [ -f frontend/pnpm-lock.yaml ] || [ -f frontend/package.json ]; then
61-
echo "exists=true" >> "$GITHUB_OUTPUT"
62-
else
63-
echo "exists=false" >> "$GITHUB_OUTPUT"
64-
fi
65-
66-
- name: Skip frontend checks (no frontend/)
67-
if: steps.detect.outputs.exists != 'true'
68-
run: echo "No frontend/ found; skipping frontend checks."
69-
7041
- name: Setup Node.js
71-
if: steps.detect.outputs.exists == 'true'
7242
uses: actions/setup-node@v4
7343
with:
7444
node-version: "20"
7545
cache: "pnpm"
7646
cache-dependency-path: frontend/pnpm-lock.yaml
7747
- name: Setup pnpm
78-
if: steps.detect.outputs.exists == 'true'
7948
uses: pnpm/action-setup@v4
8049
with:
8150
version: "9.12.2"
8251
run_install: false
8352
- name: Install dependencies
84-
if: steps.detect.outputs.exists == 'true'
85-
working-directory: frontend
8653
run: pnpm install --frozen-lockfile
8754
- name: Build web app
88-
if: steps.detect.outputs.exists == 'true'
89-
working-directory: frontend
9055
run: pnpm --filter @whalewhisper/web build

0 commit comments

Comments
 (0)