diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 00000000..73a2f16a --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,54 @@ +name: on push or pull_request + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + node-version: [8.x] + os: [ubuntu-latest] + # node-version: [8.x, 10.x, 11.x] + # os: [ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: install dependencies Linux + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get -qq update + sudo apt-get install lldb-3.9 liblldb-3.9-dev lcov -y + sudo cat /usr/share/apport/apport + - name: install npm dependencies + run: npm install --llnode_build_addon=true --llnode_coverage=true + - name: npm install, build, and test + run: TEST_LLNODE_DEBUG=1 LLNODE_DEBUG=1 TEST_LLDB_BINARY=`which lldb-3.9` npm run nyc-test-all + - name: coverage + run: | + npm run coverage + npm run codecov-upload + env: + CI: true + # linter: + # runs-on: [ubuntu-latest] + # steps: + # - uses: actions/checkout@v1 + # - name: Use Node.js LTS + # uses: actions/setup-node@v1 + # with: + # node-version: 12.x + # - name: npm install, build, and test + # run: | + # sudo apt-get -qq update + # sudo apt-get install lldb-3.9 liblldb-3.9-dev lcov -y + # npm install + # npm run linter diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 68ed9fae..00000000 --- a/.travis.yml +++ /dev/null @@ -1,147 +0,0 @@ -language: node_js -matrix: - include: - ################# - # Ubuntu Trusty # - ################# - - - name: "[Trusty] Node.js v8.x" - sudo: required - dist: trusty - before_install: - - sudo apt-get -qq update - - sudo apt-get install lldb-3.9 liblldb-3.9-dev lcov -y - install: - - npm install --llnode_build_addon=true - script: TEST_LLDB_BINARY=`which lldb-3.9` npm run nyc-test-all - node_js: "8" - after_success: - - npm run coverage - - npm run codecov-upload - - - name: "[Trusty] Node.js v10.x" - sudo: required - dist: trusty - before_install: - - sudo apt-get -qq update - - sudo apt-get install lldb-3.9 liblldb-3.9-dev lcov -y - install: - - npm install --llnode_build_addon=true --llnode_coverage=true - script: TEST_LLDB_BINARY=`which lldb-3.9` npm run nyc-test-all - node_js: "10" - after_success: - - npm run coverage - - npm run codecov-upload - - - name: "[Trusty] Node.js v11.x" - sudo: required - dist: trusty - before_install: - - sudo apt-get -qq update - - sudo apt-get install lldb-3.9 liblldb-3.9-dev lcov -y - install: - - npm install --llnode_build_addon=true --llnode_coverage=true - script: TEST_LLDB_BINARY=`which lldb-3.9` npm run nyc-test-all - node_js: "11" - after_success: - - npm run coverage - - npm run codecov-upload - - ########################### - # Nightlies & V8 Canaries # - ########################### - - # Addon is not tested due to lack of node-addon-api - - name: "[Trusty] Node.js Nightly" - node_js: "node" - sudo: required - dist: trusty - before_install: - - sudo apt-get -qq update - - sudo apt-get install lldb-3.9 liblldb-3.9-dev lcov -y - install: - - npm install --nodedir=$(dirname $(dirname $(which node)))/include/node - script: TEST_LLDB_BINARY=`which lldb-3.9` npm run nyc-test - env: - - NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly - - NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly - after_success: - - npm run coverage - - npm run codecov-upload - - # Addon is not tested due to lack of node-addon-api - - name: "[Trusty] Node.js V8 Canary" - node_js: "node" - sudo: required - dist: trusty - before_install: - - sudo apt-get -qq update - - sudo apt-get install lldb-3.9 liblldb-3.9-dev lcov -y - install: - - npm install --nodedir=$(dirname $(dirname $(which node)))/include/node - script: TEST_LLDB_BINARY=`which lldb-3.9` npm run nyc-test - env: - - NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/v8-canary - - NODEJS_ORG_MIRROR=https://nodejs.org/download/v8-canary - after_success: - - npm run coverage - - npm run codecov-upload - - ######## - # OS X # - ######## - - - name: "[OSX] Node.js v8.x" - os: osx - osx_image: xcode9.3 - install: npm install --llnode_build_addon=true - script: npm run test-all - node_js: "8" - - - name: "[OSX] Node.js v10.x" - os: osx - osx_image: xcode9.3 - install: npm install --llnode_build_addon=true - script: npm run test-all - node_js: "10" - - - name: "[OSX] Node.js v11.x" - os: osx - osx_image: xcode9.3 - install: npm install --llnode_build_addon=true - script: npm run test-all - node_js: "11" - - ########## - # Linter # - ########## - - - name: "Linter" - sudo: required - dist: trusty - before_install: - - sudo apt-get -qq update - - sudo apt-get install lldb-3.9 liblldb-3.9-dev -y - install: npm install - script: npm run linter - node_js: "10" - - # Allow the nightly installs to fail - allow_failures: - - - node_js: "node" - sudo: required - dist: trusty - env: - - NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly - - NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly - - - node_js: "node" - sudo: required - dist: trusty - env: - - NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/v8-canary - - NODEJS_ORG_MIRROR=https://nodejs.org/download/v8-canary -branches: - only: - - master diff --git a/test/common.js b/test/common.js index a8c2c125..010c2bc8 100644 --- a/test/common.js +++ b/test/common.js @@ -247,12 +247,12 @@ function spawnWithTimeout(cmd, cb) { } function saveCoreLinux(executable, scenario, core, cb) { - const cmd = `ulimit -c unlimited && ${executable} ` + + const cmd = `ulimit -S -c unlimited && ulimit -H -c unlimited && ${executable} ` + `--abort_on_uncaught_exception --expose_externalize_string ` + `${path.join(exports.fixturesDir, scenario)}; `; spawnWithTimeout(cmd, () => { // FIXME (mmarchini): Should also handle different core system settings. - spawnWithTimeout(`mv ./core ${core}`, cb); + spawnWithTimeout(`sysctl kernel.core_pattern && ls . && mv ./core ${core}`, cb); }); }