Skip to content

Commit

Permalink
Merge pull request #250 from MH4GF/change-to-use-pnpm
Browse files Browse the repository at this point in the history
change to use pnpm
  • Loading branch information
MH4GF committed Jul 1, 2023
2 parents d63f357 + f2547ab commit ea480da
Show file tree
Hide file tree
Showing 11 changed files with 4,841 additions and 3,427 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
name: 'build'
on: # rebuild any PRs and main branch changes
on:
pull_request:
push:
branches:
- main
- 'releases/*'

jobs:
build: # make sure build/ci work properly
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3.6.0
- uses: MH4GF/shared-config/.github/composite-actions/setup-pnpm@main
with:
node-version: 16.x
cache: yarn

- name: Install dependencies
run: yarn

- name: run all
run: |
yarn all
node-version-file: .node-version
pnpm-version: '8.6.5'
- run: pnpm i
- run: pnpm run all
25 changes: 6 additions & 19 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# `dist/index.js` is a special file in Actions.
# When you reference an action with `uses:` in a workflow,
# `index.js` is the code that will run.
# For our project, we generate this file through a build process from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check dist/

on:
Expand All @@ -22,21 +17,15 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3.6.0
- uses: MH4GF/shared-config/.github/composite-actions/setup-pnpm@main
with:
node-version: 16.x
cache: yarn

- name: Install dependencies
run: yarn

node-version-file: .node-version
pnpm-version: '8.6.5'
- run: pnpm i
- name: Rebuild the dist/ directory
run: |
yarn build
yarn package
pnpm run build
pnpm run package
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
Expand All @@ -45,8 +34,6 @@ jobs:
exit 1
fi
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v3
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/forbidden-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3.6.0
- uses: MH4GF/shared-config/.github/composite-actions/setup-pnpm@main
with:
node-version: 16.x
cache: yarn

- name: Install dependencies
run: yarn

- name: run depcruise
run: |
yarn run -s depcruise src --config --output-type markdown >> $GITHUB_STEP_SUMMARY
node-version-file: .node-version
pnpm-version: '8.6.5'
- run: pnpm i
- run: pnpm exec depcruise src --config --output-type markdown >> $GITHUB_STEP_SUMMARY
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./
with:
package-manager: pnpm
- uses: ./
with:
working-directory: test/sample
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
yarn package
pnpm run package
git add dist
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.16.1
Loading

0 comments on commit ea480da

Please sign in to comment.