Skip to content

Commit

Permalink
Use pnpm for package installation
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Jun 15, 2024
1 parent 9a1c0dc commit a25fd72
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,12 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache npm packages
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Cache Node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- uses: pnpm/action-setup@v4
- name: add git binaries to PATH
if: runner.os == 'Windows'
run: |
Expand All @@ -60,15 +47,15 @@ jobs:
sudo -H pip install setuptools
- name: npm ci
if: runner.os != 'Windows'
run: npm ci --cache .npm --prefer-offline
run: pnpm install
- name: npm ci (Windows)
if: runner.os == 'Windows'
run: |
$maxRetries = 3
$counter = 0
while ($counter -lt $maxRetries) {
try {
npm ci --cache .npm --prefer-offline
pnpm install
break
} catch {
Write-Host "Attempt $($counter + 1) failed. Retrying..."
Expand Down

0 comments on commit a25fd72

Please sign in to comment.