Skip to content

Commit

Permalink
fix(git): move pnpm to npm in ci of workflow
Browse files Browse the repository at this point in the history
META DATA: @toantranmei
  • Loading branch information
toantranmei committed Apr 5, 2024
1 parent dd324e6 commit b05f1bc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body:
- Nuxt Version: `3.7.3`
- CLI Version: `3.8.4`
- Nitro Version: `2.6.3`
- Package Manager: `pnpm@8.7.4`
- Package Manager: `npm@8.7.4`
- Builder: `-`
- User Config: `-`
- Runtime Modules: `-`
Expand Down
42 changes: 6 additions & 36 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,53 +29,23 @@ jobs:
- name: checkout
uses: actions/checkout@master

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
src:
- 'src/**'
- 'package.json'
- 'pnpm-lock.yaml'
- name: Install dependencies
run: pnpm install
run: npm install

- name: Prepare
run: pnpm run dev:prepare
run: npm run dev:prepare

- name: Lint
run: pnpm run lint
run: npm run lint

- name: Typecheck
run: pnpm run typecheck
run: npm run typecheck

- name: Build
run: pnpm run prepack
run: npm run prepack

- name: Test
run: pnpm run test
run: npm run test

- name: Release Edge
if: github.event_name == 'push' && steps.changes.outputs.src == 'true'
Expand Down
33 changes: 6 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,23 @@ jobs:
- name: checkout
uses: actions/checkout@master

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
run: npm install

- name: Prepare
run: pnpm run dev:prepare
run: npm run dev:prepare

- name: Lint
run: pnpm run lint
run: npm run lint

- name: Typecheck
run: pnpm run typecheck
run: npm run typecheck

- name: Build
run: pnpm run prepack
run: npm run prepack

- name: Test
run: pnpm run test
run: npm run test

- name: Version Check
id: check
Expand Down
2 changes: 1 addition & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"web": true
},
"hooks": {
"before:init": ["pnpm lint", "pnpm typecheck"]
"before:init": ["npm run lint", "npm run typecheck"]
},
"plugins": {
"@release-it/conventional-changelog": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/release-edge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
git restore -s@ -SW -- .

# Bump versions to edge
pnpm jiti ./scripts/bump-edge
npx jiti ./scripts/bump-edge

# Update token
if [[ ! -z ${NODE_AUTH_TOKEN} ]] ; then
Expand Down

0 comments on commit b05f1bc

Please sign in to comment.