|
1 |
| -name: Comprehensive CI |
| 1 | +name: 🛠️ CI |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
| 5 | + branches: |
| 6 | + - '**' # Runs on all branch pushes |
| 7 | + tags-ignore: |
| 8 | + - '**' # Ignore all tag pushes |
5 | 9 | repository_dispatch:
|
6 | 10 | types: [ pr-approved ]
|
7 | 11 |
|
| 12 | +env: |
| 13 | + PNPM_VERSION: '10' |
| 14 | + |
8 | 15 | jobs:
|
9 | 16 | build:
|
10 |
| - name: Build |
| 17 | + name: 🏗️ Build |
11 | 18 | runs-on: ubuntu-latest
|
12 | 19 | strategy:
|
13 | 20 | matrix:
|
14 |
| - node-version: [ 16.x, 18.x, 20.x ] |
| 21 | + node-version: [20.x, 22.x] |
15 | 22 | steps:
|
16 |
| - - name: Checkout sources |
| 23 | + - name: 🔄 Checkout sources |
17 | 24 | uses: actions/checkout@v4
|
18 |
| - - name: Use Node.js ${{ matrix.node-version }} |
| 25 | + - name: ⚙️ Use Node.js ${{ matrix.node-version }} |
19 | 26 | uses: actions/setup-node@v4
|
20 | 27 | with:
|
21 | 28 | node-version: ${{ matrix.node-version }}
|
22 |
| - - name: Installing dependencies |
23 |
| - run: npm ci |
24 |
| - - name: Building sources |
25 |
| - run: npm run build |
| 29 | + - name: 📦 Install pnpm |
| 30 | + uses: pnpm/action-setup@v4 |
| 31 | + with: |
| 32 | + version: ${{ env.PNPM_VERSION }} |
| 33 | + - name: 📌 Installing dependencies |
| 34 | + run: pnpm install --frozen-lockfile |
| 35 | + - name: 🛠️ Building sources |
| 36 | + run: pnpm run build |
26 | 37 |
|
27 | 38 | lint:
|
28 |
| - name: Lint Code |
| 39 | + name: 🔍 Lint Code |
29 | 40 | needs: build
|
30 | 41 | runs-on: ubuntu-latest
|
| 42 | + strategy: |
| 43 | + matrix: |
| 44 | + node-version: [20.x, 22.x] |
31 | 45 | steps:
|
32 |
| - - name: Checkout sources |
| 46 | + - name: 🔄 Checkout sources |
33 | 47 | uses: actions/checkout@v4
|
34 |
| - - name: Use Node.js 18.x |
| 48 | + - name: ⚙️ Use Node.js ${{ matrix.node-version }} |
35 | 49 | uses: actions/setup-node@v4
|
36 | 50 | with:
|
37 |
| - node-version: 18.x |
38 |
| - - name: Installing dependencies |
39 |
| - run: npm ci |
40 |
| - - name: Linting |
41 |
| - run: npm run lint |
| 51 | + node-version: ${{ matrix.node-version }} |
| 52 | + - name: 📦 Install pnpm |
| 53 | + uses: pnpm/action-setup@v4 |
| 54 | + with: |
| 55 | + version: ${{ env.PNPM_VERSION }} |
| 56 | + - name: 📌 Installing dependencies |
| 57 | + run: pnpm install --frozen-lockfile |
| 58 | + - name: ✨ Linting |
| 59 | + run: pnpm run lint |
42 | 60 | env:
|
43 | 61 | CI: true
|
44 | 62 |
|
45 | 63 | test_unit:
|
46 |
| - name: Unit Tests |
| 64 | + name: 🧪 Unit Tests |
47 | 65 | needs: build
|
48 | 66 | runs-on: ubuntu-latest
|
| 67 | + strategy: |
| 68 | + matrix: |
| 69 | + node-version: [20.x, 22.x] |
49 | 70 | steps:
|
50 |
| - - name: Checkout sources |
| 71 | + - name: 🔄 Checkout sources |
51 | 72 | uses: actions/checkout@v4
|
52 |
| - - name: Use Node.js 18.x |
| 73 | + - name: ⚙️ Use Node.js ${{ matrix.node-version }} |
53 | 74 | uses: actions/setup-node@v4
|
54 | 75 | with:
|
55 |
| - node-version: 18.x |
56 |
| - - name: Installing dependencies |
57 |
| - run: npm ci |
58 |
| - - name: Running unit tests |
59 |
| - run: npm run test:unit |
| 76 | + node-version: ${{ matrix.node-version }} |
| 77 | + - name: 📦 Install pnpm |
| 78 | + uses: pnpm/action-setup@v4 |
| 79 | + with: |
| 80 | + version: ${{ env.PNPM_VERSION }} |
| 81 | + - name: 📌 Installing dependencies |
| 82 | + run: pnpm install --frozen-lockfile |
| 83 | + - name: 🚀 Running unit tests |
| 84 | + run: pnpm run test:unit |
60 | 85 |
|
61 | 86 | test_integration:
|
62 |
| - name: Integration Tests |
63 |
| - needs: [ lint, test_unit ] |
| 87 | + name: 🧩 Integration Tests |
| 88 | + needs: |
| 89 | + - lint |
| 90 | + - test_unit |
64 | 91 | runs-on: ubuntu-latest
|
65 | 92 | strategy:
|
66 |
| - matrix: |
67 |
| - node-version: [ 18.x ] |
68 | 93 | max-parallel: 1
|
| 94 | + matrix: |
| 95 | + node-version: [20.x, 22.x] |
69 | 96 | steps:
|
70 |
| - - name: Checkout sources |
| 97 | + - name: 🔄 Checkout sources |
71 | 98 | uses: actions/checkout@v4
|
72 |
| - - name: Use Node.js 18.x |
| 99 | + - name: ⚙️ Use Node.js ${{ matrix.node-version }} |
73 | 100 | uses: actions/setup-node@v4
|
74 |
| - - name: Installing dependencies |
75 |
| - run: npm ci |
76 |
| - - name: Creating `.env` file |
| 101 | + with: |
| 102 | + node-version: ${{ matrix.node-version }} |
| 103 | + - name: 📦 Install pnpm |
| 104 | + uses: pnpm/action-setup@v4 |
| 105 | + with: |
| 106 | + version: ${{ env.PNPM_VERSION }} |
| 107 | + - name: 📌 Installing dependencies |
| 108 | + run: pnpm install --frozen-lockfile |
| 109 | + - name: 📝 Creating `.env` file |
77 | 110 | run: |
|
78 | 111 | touch .env
|
79 | 112 | echo HOST=${{ secrets.HOST }} >> .env
|
80 | 113 | echo EMAIL=${{ secrets.EMAIL }} >> .env
|
81 | 114 | echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env
|
82 |
| - - name: Running integration tests |
83 |
| - run: npm run test:integration |
| 115 | + - name: 🚀 Running integration tests |
| 116 | + run: pnpm run test:integration |
0 commit comments