Skip to content

Commit 8637dc6

Browse files
authored
[IOK-0000] ditch circleci, switch yarn to pnpm, and update husky (#1956)
1 parent 1f4f5e0 commit 8637dc6

29 files changed

Lines changed: 18423 additions & 14507 deletions

.circleci/config.yml

Lines changed: 0 additions & 92 deletions
This file was deleted.

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
node_modules
22
package.json
3-
yarn.lock
3+
pnpm-lock.yaml
44
.next
55
.github
66
bin

.github/workflows/chromatic.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# .github/workflows/chromatic.yml
22

33
# Workflow name
4-
name: ci
4+
name: Chromatic
55

66
# Event for the workflow
77
on: push
@@ -17,32 +17,20 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v4
22+
2023
- name: Read .nvmrc
21-
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
22-
id: nvm
24+
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV
2325

2426
- name: Use Node
25-
uses: actions/setup-node@v1
26-
with:
27-
always-auth: true
28-
registry-url: https://registry.npmjs.org
29-
node-version: '${{ steps.nvm.outputs.NVMRC }}'
30-
31-
- name: Get yarn cache directory path
32-
id: yarn-cache-dir-path
33-
run: echo "::set-output name=dir::$(yarn cache dir)"
34-
35-
- name: Use cached node_modules
36-
uses: actions/cache@v4
37-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
27+
uses: actions/setup-node@v5
3828
with:
39-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
40-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
41-
restore-keys: |
42-
${{ runner.os }}-yarn-
29+
node-version: ${{ env.NODE_VERSION }}
30+
cache: 'pnpm'
4331

4432
- name: Install dependencies
45-
run: yarn install --frozen-lockfile --non-interactive
33+
run: pnpm install --frozen-lockfile
4634

4735
- name: Publish to Chromatic
4836
uses: chromaui/action@v1

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
ci:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
task: [lint, test]
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v5
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
run_install: false
23+
24+
- name: Install Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version-file: ".nvmrc"
28+
cache: "pnpm"
29+
30+
- name: Install dependencies
31+
run: pnpm install
32+
33+
- name: Run lint
34+
if: matrix.task == 'lint'
35+
run: pnpm lint:ci
36+
37+
- name: Run tests
38+
if: matrix.task == 'test'
39+
run: pnpm test:ci
40+
41+
- name: Upload coverage artifact
42+
if: matrix.task == 'test' && github.event_name == 'pull_request'
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: vitest-coverage
46+
path: vitest-coverage

.github/workflows/playwright.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@ jobs:
1313
pull-requests: write
1414
steps:
1515
- uses: actions/checkout@v5
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
1618
- uses: actions/setup-node@v5
1719
with:
1820
node-version-file: ".nvmrc"
19-
cache: "yarn"
21+
cache: "pnpm"
2022
- name: Install dependencies
21-
run: yarn install --frozen-lockfile
23+
run: pnpm install --frozen-lockfile
2224
- name: Install Playwright Browsers
23-
run: yarn playwright install --with-deps
25+
run: pnpm playwright install --with-deps
2426
- name: Run Playwright tests
2527
env:
2628
AIRTABLE_PAT: ${{ secrets.AIRTABLE_PAT }}
27-
run: yarn test:e2e:headless
29+
run: pnpm test:e2e:headless
2830
- uses: actions/upload-artifact@v4
2931
if: failure()
3032
id: artifact-upload

.github/workflows/report_coverage.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Report Coverage
1+
name: Report Coverage
22

33
on:
44
workflow_run:
5-
workflows: [Upload Coverage]
5+
workflows: ["CI"]
66
types: [completed]
77

88
jobs:
@@ -18,6 +18,7 @@ jobs:
1818
- name: Download Coverage Artifact
1919
uses: actions/download-artifact@v4
2020
with:
21+
name: vitest-coverage
2122
github-token: ${{ secrets.GITHUB_TOKEN }}
2223
run-id: ${{ github.event.workflow_run.id }}
2324

.github/workflows/upload_coverage.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ logs
1212
npm-debug.log*
1313
yarn-debug.log*
1414
yarn-error.log*
15+
pnpm-debug.log*
1516

1617
# Runtime data
1718
pids

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm lint-staged

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm test:changes

0 commit comments

Comments
 (0)