Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Commit 2f9668a

Browse files
committed
🗄 Adding package size report to the workflow
1 parent baa5515 commit 2f9668a

File tree

2 files changed

+52
-27
lines changed

2 files changed

+52
-27
lines changed

.github/workflows/node.js.yml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ name: Vue-form-handler CI
55

66
on:
77
push:
8-
branches: [ "**" ]
8+
branches: [ "master" ]
99
pull_request:
1010
branches: [ "master" ]
1111

1212
jobs:
1313
build:
14-
14+
name: Package build
1515
runs-on: ubuntu-latest
1616

1717
strategy:
@@ -20,33 +20,34 @@ jobs:
2020
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2121

2222
steps:
23-
- uses: actions/checkout@v3
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v3
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
29-
- run: npm ci
30-
- run: npm run build --if-present
31-
- run: npm test
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
26+
- name: Setup Node.js version ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: 'npm'
31+
32+
- run: npm ci
33+
34+
- name: Package build test
35+
run: npm run build --if-present
3236

3337
unit-test:
38+
name: Unit testing
3439
runs-on: ubuntu-latest
3540

36-
strategy:
37-
matrix:
38-
node-version: [18.x]
39-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
40-
4141
steps:
42-
- uses: actions/checkout@v3
43-
- name: Use Node.js ${{ matrix.node-version }}
44-
uses: actions/setup-node@v3
45-
with:
46-
node-version: ${{ matrix.node-version }}
47-
cache: 'npm'
48-
- run: npm ci
49-
50-
- name: Run unit tests
51-
run: npm run test
52-
42+
- name: Checkout
43+
uses: actions/checkout@v3
44+
45+
- name: Setup Node.js
46+
uses: actions/setup-node@v3
47+
with:
48+
node-version: '18'
49+
50+
- run: npm ci
51+
52+
- name: Unit tests
53+
run: npm run test
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Package Size Report
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
pkg-size-report:
9+
name: Package Size Report
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '18' # ⬅ Specify a version of Node.js to build your app
20+
21+
- name: Package size report
22+
uses: pkg-size/action@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)