Skip to content

Commit

Permalink
ci: trying to fix broken npm x
Browse files Browse the repository at this point in the history
  • Loading branch information
motss committed Feb 3, 2022
1 parent 9263465 commit 72dee4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,23 @@ jobs:
if: env.CI_SKIP == 'false'
run: |
npm i -g npm@latest
echo "NPM_VERSION=$(npm -v)" >> $GITHUB_ENV
echo "NPM_CACHE_DIR=$(npm config get cache)" >> $GITHUB_ENV
- name: List versions
if: env.CI_SKIP == 'false'
continue-on-error: true
run: |
node -v && npm -v && which npm && pwd && ls -la
node -v && which npm && pwd && ls -la
- name: Cache dependencies
id: npm-cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ matrix.os }}-npm-${{ hashFiles('**/package-lock.json') }}
path: ${{ env.NPM_CACHE_DIR }}
key: ${{ matrix.os }}-node-${{ matrix.target }}-npm-${{ env.NPM_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-npm-
${{ matrix.os }}-node-${{ matrix.target }}-npm-${{ env.NPM_VERSION }}-
- name: Install dependencies
if: env.CI_SKIP == 'false'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"build": "npm run clean && npm run ts",
"check": "package-check",
"clean": "rm -rf .*cache *.log coverage/ dist/ logs/",
"postinstall": "npm x -y -- zx ./postinstall.mjs",
"postinstall": "npm x -y --prefer-online -- zx@latest ./postinstall.mjs",
"lint": "eslint src --ext .js,.ts",
"lint:commit": "npm x -y -- commitlint --edit",
"lint:commit": "npm x -y --prefer-online -- commitlint@latest --edit",
"lint:build": "npm run lint -- --config .build.eslintrc.json",
"pre-commit": "npm run check && nano-staged && tsc --noEmit",
"prepublishOnly": "npm run check && npm run lint:build && npm run build",
Expand Down

0 comments on commit 72dee4c

Please sign in to comment.