From 29733104c4e559daaebd23bb4e7c911f6f0e52b6 Mon Sep 17 00:00:00 2001 From: Stanley Masinde Date: Sat, 6 Jan 2024 16:14:23 +0300 Subject: [PATCH] fix: ci config --- .github/workflows/node.js.yml | 38 +++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c2229b0..9207037 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,26 +1,30 @@ -name: Node.js CI - +name: Build and test on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] - + branches: ["main"] jobs: build: - runs-on: ubuntu-latest - strategy: matrix: - node-version: [14.x, 16.x, 18.x, 19.x] + node-version: [18.x, 19.x] steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.x + - name: Setup PNPM + run: | + corepack enable + corepack prepare pnpm@latest --activate + - name: Setup environment variables + run: cp .env.example .env + - name: Install deps + run: pnpm i + - name: Lint 🧐 + run: pnpm run lint + - name: Test 🧪 + run: npm test \ No newline at end of file