Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,23 @@ jobs:
- name: Checkout source
uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache: pnpm

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Run tests
run: npm run coverage
run: pnpm coverage

- name: Send code coverage results to Coveralls
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
parallel: true
flag-name: Node.js ${{ matrix.node-version }} / ${{ matrix.os }}
Expand All @@ -58,7 +61,7 @@ jobs:
needs: test
steps:
- name: Let Coveralls know that all tests have finished
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
parallel-finished: true

Expand All @@ -71,25 +74,28 @@ jobs:
- name: Checkout source
uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Install Node.js
uses: actions/setup-node@v5
with:
node-version: "24"
cache: npm
cache: pnpm

- name: Install development dependencies
run: npm ci
run: pnpm install

- name: Build
run: npm run build
run: pnpm build

- name: Verify no un-staged changes
run: |
git status --porcelain
git diff-files --quiet

- name: Run lints
run: npm run lint
run: pnpm lint

- name: Upload publish artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -121,13 +127,17 @@ jobs:
- name: Checkout source
uses: actions/checkout@v5

- name: Install Node.js ${{ matrix.node-version }}
- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Install Node.js
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
node-version: "24"
cache: pnpm

- name: Install production dependencies
run: npm install --production
run: pnpm install --production

- name: Download publish artifact
uses: actions/download-artifact@v5
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ dist
lib
coverage
.nyc_output
package-lock.json
pnpm-lock.yaml
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ You should be using Node.js v24 or later to build this project locally
# Clone this repository
git clone https://github.com/JS-DevTools/npm-publish.git

# Install dependencies*
npm install
# Install dependencies
pnpm install

# Run all checks, builds, and unit tests
npm run all
pnpm all
```

There are also various code quality checks and tests you can run:

```shell
# Run builds and typechecking
npm run build
pnpm build

# Run the unit tests in watch mode
npm run test
pnpm test

# Autoformat the code
npm run format
pnpm format

# Lint the code
npm run lint
pnpm lint
```
Loading
Loading