From 065956f69ca18d88380bef2fc62bd07c08d90268 Mon Sep 17 00:00:00 2001 From: Kenvin Davies Date: Thu, 8 Oct 2020 01:47:20 +0800 Subject: [PATCH] build: add incremental clang-format checks PR-URL: https://github.com/nodejs/node-addon-api/pull/819 Reviewed-By: Gabriel Schulhof Reviewed-By: Michael Dawson --- .github/workflows/linter.yml | 23 +++++++++++++++++++++++ .travis.yml | 1 - 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..3cbf006 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,23 @@ +name: Style Checks + +on: [push, pull_request] + +jobs: + lint: + strategy: + matrix: + node-version: [14.x] + os: [ubuntu-latest] + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: git branch -a + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: CLANG_FORMAT_START=refs/remotes/origin/master npm run lint diff --git a/.travis.yml b/.travis.yml index 6424703..56f9c90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,6 @@ script: # Travis CI sets NVM_NODEJS_ORG_MIRROR, but it makes node-gyp fail to download headers for nightly builds. - unset NVM_NODEJS_ORG_MIRROR - - npm run lint - npm test after_success: - cpp-coveralls --gcov-options '\-lp' --build-root test/build --exclude test