Skip to content

Commit

Permalink
npx works, added cahcing
Browse files Browse the repository at this point in the history
  • Loading branch information
zMynxx committed Aug 18, 2023
1 parent 15da5d7 commit 7c71f28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .github/actions/nodejs/npm-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,24 @@ runs:
with:
node-version: ${{ inputs.node_version }}

# - name: Cache node modules
# id: cache-npm
# uses: actions/cache@v3
# env:
# cache-name: cache-node-modules
# with:
# path: ./node_modules
# key: modules-${{ hashFiles('package-lock.json') }}

- name: clean cache
shell: bash
run: |
rm -rf node_modules
npm cache clean --force
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ${{ inputs.package_json_path }}/node_modules
key: modules-${{ hashFiles('package-lock.json') }}

- name: Install Dependencies
# if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
shell: bash
working-directory: ${{ inputs.package_json_path }}
run: |
npm install ${{ inputs.force_install_dependencies == true && '--force' || '' }}
- name: Install mocha
# if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
shell: bash
working-directory: ${{ inputs.package_json_path }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,4 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
**/node_modules/**

0 comments on commit 7c71f28

Please sign in to comment.