Skip to content

Commit

Permalink
ci: use pnpm in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mfal committed Feb 5, 2025
1 parent aa318a8 commit e95d43a
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 29 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- run: yarn install --immutable
cache: "pnpm"
- run: pnpm install --immutable

- name: Test components
run: yarn components test:unit --coverage.enabled true
run: pnpm components test:unit --coverage.enabled true

- name: Report Coverage
if: always()
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node 🎛️
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Yarn Install 📦️
run: yarn install --immutable
- name: pnpm Install 📦️
run: pnpm install --immutable

- name: Setup NX 1/2 🎛️
uses: nrwl/nx-set-shas@v4
Expand All @@ -39,7 +44,7 @@ jobs:
- name: Build 🔨
env:
NEXT_BASE_PATH: "/flow"
run: yarn nx build docs
run: pnpm nx build docs

- name: Configure GitHub pages ⚙️
uses: actions/configure-pages@v5
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/publish-review-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,25 @@ jobs:
fetch-depth: 0
token: ${{ secrets.PUBLISH_PAT }}

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node 🎛️
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Git Identity 🪪
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Yarn Install 📦️
run: yarn install --immutable
- name: pnpm Install 📦️
run: pnpm install --immutable

- name: Setup NX 1/2 🎛️
uses: nrwl/nx-set-shas@v4
Expand All @@ -56,7 +61,7 @@ jobs:
run: git branch --track main origin/main

- name: Build 🔨
run: yarn nx build docs
run: pnpm nx build docs

- name: Upload files to GitHub Pages 🚀
uses: maaaathis/github-action-push-to-another-repository@main
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/publish-review-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node 🎛️
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Git Identity 🪪
Expand All @@ -43,7 +48,7 @@ jobs:
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Install Dependencies 📦️
run: yarn install --immutable
run: pnpm install --immutable

- name: Setup NX 1/2 🎛️
uses: nrwl/nx-set-shas@v4
Expand All @@ -53,10 +58,10 @@ jobs:
run: git branch --track main origin/main

- name: Build 🔨
run: yarn build --exclude @mittwald/flow-documentation
run: pnpm build --exclude @mittwald/flow-documentation

- name: Build Storybook 🔨
run: yarn nx build:storybook components
run: pnpm nx build:storybook components

- name: Upload files to GitHub Pages 🚀
uses: maaaathis/github-action-push-to-another-repository@main
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/publish-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node 🎛️
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Git Identity 🪪
Expand All @@ -43,7 +48,7 @@ jobs:
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Install Dependencies 📦️
run: yarn install --immutable
run: pnpm install --immutable

- name: Setup NX 1/2 🎛️
uses: nrwl/nx-set-shas@v4
Expand All @@ -53,10 +58,10 @@ jobs:
run: git branch --track main origin/main

- name: Build 🔨
run: yarn build --exclude @mittwald/flow-documentation
run: pnpm build --exclude @mittwald/flow-documentation

- name: Build Storybook 🔨
run: yarn nx build:storybook components
run: pnpm nx build:storybook components

- name: Upload files to GitHub Pages 🚀
uses: maaaathis/github-action-push-to-another-repository@main
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,24 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.PUBLISH_PAT }}

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node 🎛️
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Git Identity 🪪
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Yarn Install 📦️
run: yarn install --immutable
- name: pnpm Install 📦️
run: pnpm install --immutable

- name: Setup NX 1/2 🎛️
uses: nrwl/nx-set-shas@v4
Expand All @@ -48,11 +51,11 @@ jobs:
run: git branch --track main origin/main

- name: Build 🔨
run: yarn build --exclude @mittwald/flow-documentation
run: pnpm build --exclude @mittwald/flow-documentation

- name: Version and publish 🚀
run: |
yarn lerna publish \
pnpm lerna publish \
--force-publish \
--conventional-commits --conventional-prerelease="*" \
--message "chore(release): bump version to %v" \
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- run: yarn install --immutable
cache: "pnpm"
- run: pnpm install --immutable
- uses: nrwl/nx-set-shas@v4
- if: github.ref != 'refs/heads/main'
run: git branch --track main origin/main
- run: yarn lint
- run: yarn nx affected -t test,lint --parallel=3
- run: pnpm lint
- run: pnpm nx affected -t test,lint --parallel=3
# Check if working dir is clean after build
- run: git diff --exit-code

0 comments on commit e95d43a

Please sign in to comment.