From b15f976d6c335519f2abefa9d2d0c7d297778c26 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 19:08:14 +1000 Subject: [PATCH 1/5] Update ci.yml Add sensible timeouts --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adab544b..cf89b9aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,61 +10,82 @@ jobs: build: name: Build runs-on: ubuntu-latest + timeout-minutes: 10 + steps: - name: Checkout code uses: actions/checkout@v2 + - name: Setup Node.js 16.x uses: actions/setup-node@v2.1.4 with: node-version: 16.x + - name: Install dependencies run: npm ci + - name: Build PCUI run: npm run build test: name: Unit Tests runs-on: ubuntu-latest + timeout-minutes: 10 + steps: - name: Checkout code uses: actions/checkout@v2 + - name: Setup Node.js 18.x uses: actions/setup-node@v2.1.4 with: node-version: 18.x + - name: Install dependencies run: npm ci + - name: Build PCUI run: npm run build:es6 + - name: Run unit tests run: npm test lint: name: Lint runs-on: ubuntu-latest + timeout-minutes: 10 + steps: - name: Checkout code uses: actions/checkout@v2 + - name: Setup Node.js 16.x uses: actions/setup-node@v2.1.4 with: node-version: 16.x + - name: Install dependencies run: npm ci + - name: Run ESLint run: npm run lint lint-styles: name: Lint Styles runs-on: ubuntu-latest + timeout-minutes: 10 + steps: - name: Checkout code uses: actions/checkout@v2 + - name: Setup Node.js 16.x uses: actions/setup-node@v2.1.4 with: node-version: 16.x + - name: Install dependencies run: npm ci + - name: Run Stylelint run: npm run lint:styles From e95b605078ad021fa139ce6580a04b6070ab4337 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 19:10:22 +1000 Subject: [PATCH 2/5] Update ci.yml optimise "clean install" command, for speed and log clarity. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf89b9aa..6c1ce29c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: node-version: 16.x - name: Install dependencies - run: npm ci + run: npm clean-install --progress=false --no-fund - name: Build PCUI run: npm run build @@ -42,7 +42,7 @@ jobs: node-version: 18.x - name: Install dependencies - run: npm ci + run: npm clean-install --progress=false --no-fund - name: Build PCUI run: npm run build:es6 @@ -65,7 +65,7 @@ jobs: node-version: 16.x - name: Install dependencies - run: npm ci + run: npm clean-install --progress=false --no-fund - name: Run ESLint run: npm run lint @@ -85,7 +85,7 @@ jobs: node-version: 16.x - name: Install dependencies - run: npm ci + run: npm clean-install --progress=false --no-fund - name: Run Stylelint run: npm run lint:styles From ce293480cd45150776676913d6c40432d3d1aae2 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 19:11:09 +1000 Subject: [PATCH 3/5] Update ci.yml allow repository owners to manually re-run CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c1ce29c..a319ef27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ name: CI on: + workflow_dispatch: push: branches: [ main ] pull_request: From 7bceb487ac25fc2804cf56625e63ff80836f9691 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 19:13:33 +1000 Subject: [PATCH 4/5] Update ci.yml upgrade checkout action to v4 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a319ef27..d6410bee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Node.js 16.x uses: actions/setup-node@v2.1.4 @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Node.js 18.x uses: actions/setup-node@v2.1.4 @@ -58,7 +58,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Node.js 16.x uses: actions/setup-node@v2.1.4 @@ -78,7 +78,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Node.js 16.x uses: actions/setup-node@v2.1.4 From b120abefa12debf65a5187634982963bbecd3f9d Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 19:17:39 +1000 Subject: [PATCH 5/5] Update ci.yml Drop unsupported node 16 from CI build matrix. Update setup-node action to v3 --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6410bee..9327f2d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Node.js 16.x - uses: actions/setup-node@v2.1.4 + - name: Setup Node.js 18.x + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Install dependencies run: npm clean-install --progress=false --no-fund @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Node.js 18.x - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v3 with: node-version: 18.x @@ -60,10 +60,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Node.js 16.x - uses: actions/setup-node@v2.1.4 + - name: Setup Node.js 18.x + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Install dependencies run: npm clean-install --progress=false --no-fund @@ -80,10 +80,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Node.js 16.x - uses: actions/setup-node@v2.1.4 + - name: Setup Node.js 18.x + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Install dependencies run: npm clean-install --progress=false --no-fund