Workflow: Incorrect install npm working directory

This commit is contained in:
Refringe 2024-04-25 01:34:35 -04:00
parent 593121e5a7
commit 432ae73a6b
No known key found for this signature in database
GPG Key ID: 7715B85B4A6306ED

View File

@ -25,10 +25,10 @@ jobs:
REF=${GITHUB_REF_NAME} REF=${GITHUB_REF_NAME}
fi fi
rm -rf ${{ github.workspace }}/current rm -rf /workspace/SPT-AKI/Server/current
git clone https://dev.sp-tarkov.com/${{ github.repository }}.git ${{ github.workspace }}/current git clone https://dev.sp-tarkov.com/${{ github.repository }}.git /workspace/SPT-AKI/Server/current
cd ${{ github.workspace }}/current cd /workspace/SPT-AKI/Server/current
git checkout $REF git checkout $REF
env: env:
GITHUB_SHA: ${{ github.sha }} GITHUB_SHA: ${{ github.sha }}
@ -38,7 +38,7 @@ jobs:
- name: Pull LFS Files - name: Pull LFS Files
run: | run: |
cd ${{ github.workspace }}/current && ls -lah cd /workspace/SPT-AKI/Server/current && ls -lah
git lfs pull && git lfs ls-files git lfs pull && git lfs ls-files
shell: bash shell: bash
@ -46,19 +46,21 @@ jobs:
id: cache-npm-dependencies id: cache-npm-dependencies
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: current/project/node_modules path: /workspace/SPT-AKI/Server/current/project/node_modules
key: npm-dependencies-${{ hashFiles('current/project/package.json') }} key: npm-dependencies-${{ hashFiles('/workspace/SPT-AKI/Server/current/project/package.json') }}
- name: Install NPM Dependencies - name: Install NPM Dependencies
if: steps.cache-npm-dependencies.outputs.cache-hit != 'true' if: steps.cache-npm-dependencies.outputs.cache-hit != 'true'
run: | run: |
rm -rf current/project/node_modules cd /workspace/SPT-AKI/Server/current/project
rm -rf /workspace/SPT-AKI/Server/current/project/node_modules
npm install npm install
shell: bash shell: bash
- name: Run Tests - name: Run Tests
id: run-tests id: run-tests
run: | run: |
cd /workspace/SPT-AKI/Server/current/project
npm run test npm run test
shell: bash shell: bash