From 98f945bf3c941b0bf41ae4b129489a9f01075a72 Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Mon, 4 Mar 2024 17:27:07 -0500 Subject: [PATCH 1/6] docs: Fix typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 652328d..0d1c1ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,6 @@ In case your editor does not respect `.editorconfig`, here is a summary of rules - syntax - ES6/ES2015 - variable declarations - use `const` and `let` -Please look through existing code to get a general sense of the coding style and practice. Keep your changes consitent with original. +Please look through existing code to get a general sense of the coding style and practice. Keep your changes consistent with original. Thank You for deciding to help the community! From d2d6266f5a7021c8a315491457d097df80608ba9 Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Mon, 4 Mar 2024 17:27:12 -0500 Subject: [PATCH 2/6] chore: Document the minimum supported version of Node.js --- .nvmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..4a9c19c --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v14.21.3 From 677a82babbcd8f2f41f1f8e1dfc6e9dd623c2d38 Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Mon, 4 Mar 2024 17:27:17 -0500 Subject: [PATCH 3/6] refactor: Extract "lint" npm script --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 55ead6e..6d2815e 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "prepublishOnly": "rm -rf ./lib && npm run build", "build": "babel ./src --out-dir ./lib", "build:dev": "rm -rf ./lib && babel ./src --out-dir ./lib -s", - "test": "eslint -c .eslintrc.json src test && npm run test:unit && npm run test:integration", + "lint": "eslint -c .eslintrc.json src test", + "test": "npm run lint && npm run test:unit && npm run test:integration", "test:unit": "nyc mocha --require @babel/register --recursive ./test/unit", "test:app": "wdio test/integration/docker-app/wdio.conf.js", "test:selenium": "wdio test/integration/docker-selenium/wdio.conf.js", From 6c985e359e7203dc723f097d632998f215bb70b8 Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Mon, 4 Mar 2024 17:27:21 -0500 Subject: [PATCH 4/6] chore: Add GitHub Workflow for CI build --- .codeclimate.yml | 47 ---------------------------------------- .github/workflows/ci.yml | 31 ++++++++++++++++++++++++++ .travis.yml | 35 ------------------------------ 3 files changed, 31 insertions(+), 82 deletions(-) delete mode 100644 .codeclimate.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 0e9e887..0000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,47 +0,0 @@ -version: "2" -checks: - argument-count: - enabled: true - config: - threshold: 4 - complex-logic: - enabled: true - config: - threshold: 4 - file-lines: - enabled: true - config: - threshold: 250 - method-complexity: - enabled: true - config: - threshold: 5 - method-count: - enabled: true - config: - threshold: 20 - method-lines: - enabled: true - config: - threshold: 40 - nested-control-flow: - enabled: true - config: - threshold: 4 - return-statements: - enabled: true - config: - threshold: 4 - similar-code: - enabled: true - identical-code: - enabled: true -plugins: - eslint: - enabled: true - channel: "eslint-6" - config: - config: .eslintrc.json -exclude_patterns: - - "**/node_modules/" - - "**/test/" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..841e595 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +--- +name: CI + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ['14'] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js v${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build --if-present + - name: Run Tests + run: | + npm test + npm run test:app + npm run test:selenium diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0e61e54..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -env: - global: - - CC_TEST_REPORTER_ID=17f8fadda4b2b6209c8e9f36441887cac12f0cfcb1a7896b805966a7b0b954e0 - -# Node setup -language: node_js -node_js: - - '14' - -# Chrome addon -addons: - chrome: stable - -# Docker service -sudo: required -services: - - docker - -# Caching -cache: - directories: - - node_modules - -before_script: - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build - - npm ci - -script: - - npm test - -after_script: - - ./cc-test-reporter format-coverage -t lcov - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT From cc480e25e132d3e5b8b873a72139ba8c0565d05b Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Tue, 5 Mar 2024 00:04:01 -0500 Subject: [PATCH 5/6] ci: Add timeout --- .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 841e595..f78ffe6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - name: Build run: npm run build --if-present - name: Run Tests - run: | - npm test - npm run test:app - npm run test:selenium + run: npm test + + # The Workflow will run for hours on failure without a timeout. The duration is an estimate. + timeout-minutes: 10 From 3706128169d0d27b184d0d40395a2ea6aaef8e3f Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Tue, 5 Mar 2024 00:13:33 -0500 Subject: [PATCH 6/6] Remove manual trigger --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f78ffe6..defda7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,6 @@ on: branches: - main pull_request: - workflow_dispatch: jobs: build: