Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pnpm #463

Merged
merged 4 commits into from
Jul 7, 2023
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
33 changes: 26 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,42 @@ jobs:
- name: Checkout 🗒️
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
## install node and dependancies
- uses: actions/setup-node@v3
name: Setup Node.js
with:
node-version: '16.x'
cache: 'yarn'
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8.6.6
run_install: false

- name: Install 💽
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
yarn install
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
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

- name: Build Quartz
run: |
yarn build
pbpm build

- name: Build StoryBook🤖
run: |
NODE_OPTIONS=--max_old_space_size=4096 yarn run predeploy
NODE_OPTIONS=--max_old_space_size=4096 pnpm run predeploy

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.2
Expand Down
32 changes: 27 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,35 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v3

## install node and dependancies
- uses: actions/setup-node@v3
name: Setup Node.js
with:
node-version: '18.x'
cache: 'yarn'
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8.6.6
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@v3
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: yarn install
run: pnpm install

- name: Use variables
run: echo "$CHROMATIC_PROJECT_TOKEN"
Expand All @@ -30,4 +52,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.EHSAN_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
run: pnpm semantic-release
36 changes: 30 additions & 6 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,51 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
## install node and dependancies
- uses: actions/setup-node@v3
name: Setup Node.js
with:
node-version: '18.x'

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8.6.6
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@v3
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: yarn
run: pnpm install

- name: Run linter
run: yarn run test:lint
run: pnpm run test:lint

- name: Run formatter
run: yarn run test:prettier
run: pnpm run test:prettier

### TODO: to fix ci running storybook tests ###
# - name: Serve Storybook and run tests
# run: yarn run serve:storybook:test
# run: pnpm run serve:storybook:test

- name: Install chromium
run: yarn playwright install chromium
run: pnpm playwright install chromium

- name: Playwright component test
run: yarn test-ct
run: pnpm test-ct
- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
Loading