From daf1c3b0966b593c26051008d7d6a3099f3a12ff Mon Sep 17 00:00:00 2001 From: Matt Warman Date: Fri, 1 Mar 2024 08:37:47 -0500 Subject: [PATCH] SLSCMN-19 Update GitHub Actions (#21) SLSCMN-19 update github marketplace actions --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++----------- .github/workflows/publish.yml | 19 +++++++++---- 2 files changed, 50 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd49838..c7aee77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,46 +7,67 @@ on: jobs: build: - name: 'Build' + name: Build runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js Environment + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'npm' - - run: npm ci - - run: npm run build + + - name: Install Dependencies + run: npm ci + + - name: Build + run: npm run build test: - name: 'Test' + name: Test runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js Environment + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'npm' - - run: npm ci - - run: npm run test:coverage + + - name: Install Dependencies + run: npm ci + + - name: Run Unit Tests + run: npm run test:coverage lint: - name: 'Lint' + name: Lint runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js Environment + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'npm' - - run: npm ci - - run: npm run lint + + - name: Install Dependencies + run: npm ci + + - name: Run Linter + run: npm run lint diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index faae797..7d6e494 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,14 +14,23 @@ jobs: timeout-minutes: 5 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js Environment + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'npm' registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run build - - run: npm publish + + - name: Install Dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Publish + run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}