fix: use full git clone in test workflow to ensure SHA is available
Run Tests / Test Summary (push) Blocked by required conditions
Run Tests / Backend Tests (push) Failing after 9m59s
Run Tests / Frontend Tests (push) Failing after 2h2m49s

This commit is contained in:
Gan, Jimmy
2026-04-04 19:54:30 +08:00
parent f32a633071
commit 939a99ac22
+2 -5
View File
@@ -16,7 +16,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
run: | run: |
git clone --depth 1 --branch ${{ github.ref_name }} http://gitea:3000/jimmy/nas-tools.git . git clone http://gitea:3000/jimmy/nas-tools.git .
git checkout ${{ github.sha }} git checkout ${{ github.sha }}
- name: Install dependencies - name: Install dependencies
@@ -33,14 +33,12 @@ jobs:
cd dashboard/backend cd dashboard/backend
. venv/bin/activate . venv/bin/activate
pytest tests/unit/ -v --timeout=30 -x pytest tests/unit/ -v --timeout=30 -x
echo "✅ Unit tests passed"
- name: Run integration tests - name: Run integration tests
run: | run: |
cd dashboard/backend cd dashboard/backend
. venv/bin/activate . venv/bin/activate
pytest tests/integration/ -v --timeout=30 -x pytest tests/integration/ -v --timeout=30 -x
echo "✅ Integration tests passed"
frontend-tests: frontend-tests:
name: Frontend Tests name: Frontend Tests
@@ -49,7 +47,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
run: | run: |
git clone --depth 1 --branch ${{ github.ref_name }} http://gitea:3000/jimmy/nas-tools.git . git clone http://gitea:3000/jimmy/nas-tools.git .
git checkout ${{ github.sha }} git checkout ${{ github.sha }}
- name: Install Node.js - name: Install Node.js
@@ -66,7 +64,6 @@ jobs:
run: | run: |
cd dashboard/frontend cd dashboard/frontend
npm run test:coverage -- --reporter=verbose --run npm run test:coverage -- --reporter=verbose --run
echo "✅ Frontend tests passed"
test-summary: test-summary:
name: Test Summary name: Test Summary