Skip to content

Commit

Permalink
use pnpm for test
Browse files Browse the repository at this point in the history
  • Loading branch information
KhudaDad414 committed Apr 27, 2024
1 parent ac6a290 commit 460ba61
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 31 deletions.
34 changes: 11 additions & 23 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,24 @@ jobs:
name: Checkout repository
uses: actions/checkout@v4
- if: steps.should_run.outputs.shouldrun == 'true'
name: Check if Node.js project and has package.json
id: packagejson
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
shell: bash
- if: steps.packagejson.outputs.exists == 'true'
name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- if: steps.packagejson.outputs.exists == 'true'
uses: pnpm/action-setup@v3
- if: steps.should_run.outputs.shouldrun == 'true'
name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ steps.lockversion.outputs.version }}"
- if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest'
#npm cli 10 is buggy because of some cache issue
name: Install npm cli 8
shell: bash
run: npm install -g [email protected]
- if: steps.packagejson.outputs.exists == 'true'
cache: 'pnpm'
- if: steps.should_run.outputs.shouldrun == 'true'
name: Install dependencies
shell: bash
run: npm ci
- if: steps.packagejson.outputs.exists == 'true'
run: pnpm install
- if: steps.should_run.outputs.shouldrun == 'true'
name: Test
run: npm test --if-present
- if: steps.packagejson.outputs.exists == 'true' && matrix.os == 'ubuntu-latest'
run: pnpm test --if-present
- if: steps.should_run.outputs.shouldrun == 'true' && matrix.os == 'ubuntu-latest'
#linting should run just one and not on all possible operating systems
name: Run linter
run: npm run lint --if-present
- if: steps.packagejson.outputs.exists == 'true'
run: pnpm run lint --if-present
- if: steps.should_run.outputs.shouldrun == 'true'
name: Run release assets generation to make sure PR does not break it
shell: bash
run: npm run generate:assets --if-present
run: pnpm run generate:assets --if-present
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is a monorepo containing Studio source code, design system, and all their d
Clone this repo and run:

```
npm install
pnpm install
```

> **Note:** NPM v7+ is required.
Expand All @@ -17,37 +17,37 @@ npm install
#### Run Studio locally

```
npm run studio
pnpm run studio
```

#### Run the Design System locally

```
npm run ds
pnpm run ds
```

#### Run Studio and the Design System locally at the same time

```
npm run dev
pnpm run dev
```

#### Build Studio for production

```
npm run build:studio
pnpm run build:studio
```

#### Build the Design System for production

```
npm run build:ds
pnpm run build:ds
```

#### Build Studio and the Design System for production

```
npm run build
pnpm run build
```

## Architecture decision records
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"apps/*",
"packages/*"
],
"packageManager": "[email protected]",
"packageManager": "[email protected]",
"dependencies": {
"@changesets/cli": "^2.26.2"
}
Expand Down

0 comments on commit 460ba61

Please sign in to comment.