Skip to content

Commit 5d6729e

Browse files
authored
Merge pull request #484 from devrnt/feature/pnpm
Migrate to pnpm
2 parents 835ae04 + d6ba1a2 commit 5d6729e

15 files changed

Lines changed: 28149 additions & 27013 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3535

3636
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v2
37+
- name: Checkout
38+
uses: actions/checkout@v3
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL

.github/workflows/deploy.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,32 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-20.04
11+
strategy:
12+
matrix:
13+
node-version: [18]
1114
steps:
12-
- uses: actions/checkout@v2
15+
- name: Checkout
16+
uses: actions/checkout@v3
1317

14-
- name: Setup Node
15-
uses: actions/setup-node@v1
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v2
1620
with:
17-
node-version: '12.x'
21+
version: 7
1822

19-
- name: Get yarn cache
20-
id: yarn-cache
21-
run: echo "::set-output name=dir::$(yarn cache dir)"
22-
23-
- name: Cache dependencies
24-
uses: actions/cache@v1
23+
- name: Use Node ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
2525
with:
26-
path: ${{ steps.yarn-cache.outputs.dir }}
27-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-yarn-
30-
31-
- run: yarn install --frozen-lockfile
32-
- run: yarn build
33-
- run: yarn build:playground
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Build
33+
run: pnpm build
34+
35+
- name: Build playground
36+
run: pnpm build:playground
3437

3538
- name: Deploy
3639
uses: peaceiris/actions-gh-pages@v3

.github/workflows/e2e-testing.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,34 @@ on: [pull_request]
33
jobs:
44
cypress-run:
55
runs-on: ubuntu-20.04
6+
strategy:
7+
matrix:
8+
node-version: [16,18]
69

710
steps:
811
- name: Checkout
9-
uses: actions/checkout@v1
12+
uses: actions/checkout@v3
13+
14+
- name: Install pnpm
15+
uses: pnpm/action-setup@v2
16+
with:
17+
version: 7
18+
19+
- name: Use Node ${{ matrix.node-version }}
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'pnpm'
24+
25+
- name: Install dependencies
26+
run: pnpm install --frozen-lockfile
1027

1128
- name: Cypress run
1229
uses: cypress-io/github-action@v2
1330
with:
14-
start: yarn start:playground
31+
# Already installed on step above
32+
install: false
33+
start: pnpm start:playground
1534
wait-on: 'http://localhost:1234'
1635
browser: chrome
1736
headless: true

.github/workflows/main.yml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,33 @@ on: [push, pull_request]
33
jobs:
44
build:
55
runs-on: ubuntu-20.04
6-
6+
strategy:
7+
matrix:
8+
node-version: [16,18]
9+
710
steps:
8-
- name: Begin CI...
9-
uses: actions/checkout@v2
11+
- name: Checkout
12+
uses: actions/checkout@v3
1013

11-
- name: Use Node 12
12-
uses: actions/setup-node@v1
14+
- name: Install pnpm
15+
uses: pnpm/action-setup@v2
1316
with:
14-
node-version: 12.x
17+
version: 7
1518

16-
- name: Use cached node_modules
17-
uses: actions/cache@v1
19+
- name: Use Node ${{ matrix.node-version }}
20+
uses: actions/setup-node@v3
1821
with:
19-
path: node_modules
20-
key: nodeModules-${{ hashFiles('**/yarn.lock') }}
21-
restore-keys: |
22-
nodeModules-
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'pnpm'
2324

2425
- name: Install dependencies
25-
run: yarn install --frozen-lockfile
26-
env:
27-
CI: true
26+
run: pnpm install --frozen-lockfile
2827

2928
- name: Lint
30-
run: yarn lint
31-
env:
32-
CI: true
29+
run: pnpm lint
3330

3431
- name: Test
35-
run: yarn test --ci --coverage --maxWorkers=2
36-
env:
37-
CI: true
32+
run: pnpm test -- --coverage --maxWorkers=2
3833

3934
- name: Build
40-
run: yarn build
41-
env:
42-
CI: true
35+
run: pnpm build

.github/workflows/pull-request.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,28 @@ on: [pull_request]
33
jobs:
44
build:
55
runs-on: ubuntu-20.04
6+
strategy:
7+
matrix:
8+
node-version: [18]
69

710
steps:
8-
- uses: actions/checkout@v2
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
14+
- name: Install pnpm
15+
uses: pnpm/action-setup@v2
16+
with:
17+
version: 7
18+
19+
- name: Use Node ${{ matrix.node-version }}
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'pnpm'
24+
25+
- name: Install dependencies
26+
run: pnpm install --frozen-lockfile
27+
928
- uses: preactjs/compressed-size-action@v2
1029
with:
1130
repo-token: '${{ secrets.GITHUB_TOKEN }}'

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shamefully-hoist=false

0 commit comments

Comments
 (0)