From a985d979b43c4b04e7c5b345adb7c50ecb1e1cdc Mon Sep 17 00:00:00 2001 From: fisker Date: Fri, 23 Oct 2026 00:19:30 +0800 Subject: [PATCH 1/2] Move to GitHub actions --- .circleci/config.yml | 87 -------------------------------------- .github/workflows/test.yml | 50 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 87 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/test.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 3371b59..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,87 +0,0 @@ -unit_tests: &unit_tests - steps: - - checkout - - restore_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - - run: - name: NPM Rebuild - command: npm install - - run: - name: Run unit tests. - command: npm run ci:test -jobs: - dependency_cache: - docker: - - image: rollupcabal/circleci-node-base:latest - steps: - - checkout - - restore_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - - run: - name: Install Dependencies - command: npm install - - save_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - paths: - - ./node_modules - node-v12-latest: - docker: - - image: rollupcabal/circleci-node-v12:latest - steps: - - checkout - - restore_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - - run: - name: NPM Rebuild - command: npm install - - run: - name: Run unit tests. - command: npm run ci:coverage - - run: - name: Submit coverage data to codecov. - command: bash <(curl -s https://codecov.io/bash) - when: on_success - node-v14-latest: - docker: - - image: rollupcabal/circleci-node-v14:latest - <<: *unit_tests - analysis: - docker: - - image: rollupcabal/circleci-node-base:latest - steps: - - checkout - - restore_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - - run: - name: NPM Rebuild - command: npm install - - run: - name: Run Linting - command: npm run lint - - run: - name: Run NPM Audit - command: npm run security -version: 2.0 -workflows: - version: 2 - validate: - jobs: - - dependency_cache - - analysis: - requires: - - dependency_cache - filters: - tags: - only: /.*/ - - node-v14-latest: - requires: - - analysis - filters: - tags: - only: /.*/ - - node-v12-latest: - requires: - - analysis - filters: - tags: - only: /.*/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7c56392 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,50 @@ +name: Run Tests + +on: + push: + branches: + - master + - github-action + pull_request: + + +jobs: + test: + strategy: + fail-fast: false + matrix: + node_version: + - "" + - "12" + name: Node.js ${{ matrix.node_version }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: NPM Rebuild + run: npm install + + - name: Run unit tests + run: npm run ci:coverage + + - name: Submit coverage data to codecov. + run: bash <(curl -s https://codecov.io/bash) + + analysis: + strategy: + fail-fast: false + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: NPM Rebuild + run: npm install + + - name: Run Linting + run: npm run lint + + - name: Run NPM Audit + run: npm run security + From f76e976a0e545566958fba55d29638f02d8aa292 Mon Sep 17 00:00:00 2001 From: fisker Date: Fri, 23 Oct 2026 00:23:11 +0800 Subject: [PATCH 2/2] Disable `npm run security` --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c56392..f31eae4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - github-action pull_request: @@ -45,6 +44,7 @@ jobs: - name: Run Linting run: npm run lint - - name: Run NPM Audit - run: npm run security + # Disabled temporarily + # - name: Run NPM Audit + # run: npm run security