From 0aea730a62f067babcf2479c9672b9ff528976d7 Mon Sep 17 00:00:00 2001 From: Muhammad Yasser Jazirahly Date: Tue, 24 Dec 2024 16:25:09 +0400 Subject: [PATCH] Update lint-and-test.yaml --- .github/workflows/lint-and-test.yaml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index 1b1bd3a..67b324d 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -1,22 +1,18 @@ -name: Verify and Publish to npm registry -on: - release: - types: [ published ] +name: Lint and Test +on: push jobs: build: runs-on: ubuntu-latest - permissions: - contents: read - id-token: write + strategy: + matrix: + node-version: ['20.x', '22.x', '23.x'] steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 with: - node-version: '22.x' - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - name: Verify - run: npm test - - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install dependencies + run: npm ci + - run: npm test \ No newline at end of file