fix: use full git clone in test workflow to ensure SHA is available
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user