mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-06 13:48:58 +02:00
Merge 55db4393dc
into a5d219ed05
This commit is contained in:
commit
3ef4f65d65
5
.github/config/.files.yaml
vendored
5
.github/config/.files.yaml
vendored
@ -27,3 +27,8 @@ project: &project
|
|||||||
- gradlew.bat
|
- gradlew.bat
|
||||||
- launch4jConfig.xml
|
- launch4jConfig.xml
|
||||||
- settings.gradle
|
- settings.gradle
|
||||||
|
|
||||||
|
frontend: &frontend
|
||||||
|
- frontend/**
|
||||||
|
- .github/workflows/testdriver.yml
|
||||||
|
- testing/**
|
||||||
|
23
.github/workflows/testdriver.yml
vendored
23
.github/workflows/testdriver.yml
vendored
@ -116,8 +116,25 @@ jobs:
|
|||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
files-changed:
|
||||||
|
if: always()
|
||||||
|
name: detect what files changed
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 3
|
||||||
|
outputs:
|
||||||
|
frontend: ${{ steps.changes.outputs.frontend }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
|
- name: Check for file changes
|
||||||
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||||
|
id: changes
|
||||||
|
with:
|
||||||
|
filters: ".github/config/.files.yaml"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
needs: deploy
|
if: needs.files-changed.outputs.frontend == 'true'
|
||||||
|
needs: [deploy, files-changed]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -132,12 +149,14 @@ jobs:
|
|||||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
cache-dependency-path: frontend/package-lock.json
|
||||||
|
|
||||||
- name: Run TestDriver.ai
|
- name: Run TestDriver.ai
|
||||||
uses: testdriverai/action@f0d0f45fdd684db628baa843fe9313f3ca3a8aa8 #1.1.3
|
uses: testdriverai/action@f0d0f45fdd684db628baa843fe9313f3ca3a8aa8 #1.1.3
|
||||||
with:
|
with:
|
||||||
key: ${{secrets.TESTDRIVER_API_KEY}}
|
key: ${{secrets.TESTDRIVER_API_KEY}}
|
||||||
prerun: |
|
prerun: |
|
||||||
|
cd frontend
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
npm install dashcam-chrome --save
|
npm install dashcam-chrome --save
|
||||||
@ -167,6 +186,7 @@ jobs:
|
|||||||
sudo chmod 600 ../private.key
|
sudo chmod 600 ../private.key
|
||||||
|
|
||||||
- name: Cleanup deployment
|
- name: Cleanup deployment
|
||||||
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << EOF
|
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << EOF
|
||||||
cd /stirling/test-${{ github.sha }}
|
cd /stirling/test-${{ github.sha }}
|
||||||
@ -174,3 +194,4 @@ jobs:
|
|||||||
cd /stirling
|
cd /stirling
|
||||||
rm -rf test-${{ github.sha }}
|
rm -rf test-${{ github.sha }}
|
||||||
EOF
|
EOF
|
||||||
|
continue-on-error: true # Ensure cleanup runs even if previous steps fail
|
||||||
|
Loading…
Reference in New Issue
Block a user