From f278c2cbedd83054cc3b1ba9024dae2e33dfd68a Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 4 Dec 2020 22:50:08 -0600 Subject: [PATCH 1/6] Delete travis and appveyor --- .travis.yml | 35 ----------------------------------- appveyor.yml | 25 ++----------------------- 2 files changed, 2 insertions(+), 58 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1831c829..00000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: node_js -sudo: false - -notifications: - email: - on_success: never - on_failure: change - -node_js: - - "8" - - "10" - - "12.14.1" - -before_install: - - export CXX="g++-4.9" CC="gcc-4.9" - -script: - - npm run standard - - npm run test:node - - npm run test:native - -git: - depth: 10 - -branches: - only: - - master - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-4.9 - - g++-4.9 diff --git a/appveyor.yml b/appveyor.yml index aa43e41e..795da41c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,27 +1,6 @@ -image: Visual Studio 2015 - -environment: - matrix: - - nodejs_version: "8" - - nodejs_version: "12.14.1" - -platform: - - x86 - - x64 - -install: - - ps: Install-Product node $env:nodejs_version - - git submodule update --init - - node --version - - npm --version - - npm install - -test_script: - - npm run standard - - npm run test:node - +# empty appveyor build: off branches: only: - - master + - non-existing From 35147b237692f2cdc0d67d12f7f1c637afaa9b03 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 4 Dec 2020 22:31:43 -0600 Subject: [PATCH 2/6] Add GithubActions --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..5a3e43ae --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: ci +on: + - pull_request + - push + +jobs: + Test: + if: "!contains(github.event.head_commit.message, '[skip ci]')" + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + node_version: + - 10 + - 12 + - 14 + name: Node ${{ matrix.node_version }} on ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Setup node + uses: actions/setup-node@v2-beta + with: + node-version: ${{ matrix.node_version }} + node-arch: ${{ matrix.node_arch }} + + - name: Install dependencies + run: npm install + + - name: Lint + run: npm run standard + + - name: Run tests + run: | + npm run test:node + npm run test:native + + Skip: + if: contains(github.event.head_commit.message, '[skip ci]') + runs-on: ubuntu-latest + steps: + - name: Skip CI 🚫 + run: echo skip ci From 4cf26718f30b877a47bc8a827bf9707263906718 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 4 Dec 2020 22:37:55 -0600 Subject: [PATCH 3/6] Add fail-fast false to allow all jobs to run --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a3e43ae..f0cf99e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]')" runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: - ubuntu-latest From cfcb76ef6ad904822c7bc83db017313a0598272f Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 4 Dec 2020 22:42:22 -0600 Subject: [PATCH 4/6] Add missing node in test:native --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b514e5c6..c2d237bc 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build:node": "node-gyp rebuild", "build:browser": "script/build-browser-version.sh", "build": "npm run build:node && npm run build:browser", - "test:native": "script/test-native.js", + "test:native": "node ./script/test-native.js", "test:node": "mocha test/js/*.js", "test:browser": "SUPERSTRING_USE_BROWSER_VERSION=1 mocha test/js/*.js", "test": "npm run test:node && npm run test:browser", From b308a0a5dccef6a65e7919375bd8d8473d76e5b3 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 4 Dec 2020 22:47:11 -0600 Subject: [PATCH 5/6] Cache node_modules --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0cf99e5..72cd4c51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,12 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - name: Cache + uses: actions/cache@v2 + with: + path: | + 'node_modules' + key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('package.json') }} - name: Setup node uses: actions/setup-node@v2-beta From 5b9af24e5051126afacd2ab760559006eb4eb8ba Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Sat, 5 Dec 2020 06:17:41 -0600 Subject: [PATCH 6/6] Remove unused node_arch --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72cd4c51..11737170 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,6 @@ jobs: uses: actions/setup-node@v2-beta with: node-version: ${{ matrix.node_version }} - node-arch: ${{ matrix.node_arch }} - name: Install dependencies run: npm install