From c86d7ff03e58339e8bbad0d55ca12dbac19c73fa Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 19 May 2022 10:42:49 +0100 Subject: [PATCH 1/2] run tests on all branches (not just PRs) --- .github/workflows/nodejs.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 4e4925b..c09f318 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -3,8 +3,6 @@ name: Build on: pull_request: push: - branches: - - main jobs: test-node: From 3d711da0edb794c84eb14801269deb896695bfe7 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 19 May 2022 10:43:22 +0100 Subject: [PATCH 2/2] upgrade node runner to 16 LTS --- .github/workflows/nodejs.yml | 19 ++++++------------- .github/workflows/publish.yml | 8 +++++--- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c09f318..6d84019 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -10,20 +10,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the project - uses: actions/checkout@v2 - - name: Cache node modules - uses: actions/cache@v2 + uses: actions/checkout@v3 + - name: Use Node.js 16.x (LTS) + uses: actions/setup-node@v3 with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Use Node.js 13.11.0 - uses: actions/setup-node@v1 - with: - node-version: 13.11.0 - - name: Install dependencies - run: npm i + node-version: 16.x + cache: 'npm' + - run: npm ci - name: Lint Codebase run: npm run lint - name: Run Node.js Tests diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c3434a6..264bdd3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,10 +8,12 @@ jobs: publish-npm: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Checkout the project + uses: actions/checkout@v3 + - name: Use Node.js 16.x (LTS) + uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 16.x registry-url: https://registry.npmjs.org/ cache: npm - run: npm ci