diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62c9444de6..b5f5f2c631 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,30 +9,17 @@ jobs: runs-on: ${{ matrix.config.os }} strategy: matrix: - node-version: [14.x] config: + # arch isn't used and we have no way to use it currently - { os: macos-latest, arch: x64 } - { os: ubuntu-latest, arch: x64 } - { os: windows-latest, arch: x64 } - - { os: windows-latest, arch: ia32 } steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} - # https://github.com/nodejs/node-gyp/issues/1663#issuecomment-535049449 - - name: patch node gyp on windows to support Visual Studio 2019 - if: matrix.os == 'windows-latest' - shell: powershell - run: | - npm install --global node-gyp@latest - npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} - - name: upgrade npm - run: npm install -g npm - - name: npm install - run: npm install - - name: npm run prebuild - run: npm run prebuild + node-version: 14.x + - run: npm ci + - run: npm run prebuild env: prebuild_upload: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 89114c4f98..0000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Lint -on: - push: - branches: - - '**' - # pull_request: - # types: [opened, synchronize] -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Use Node.js 14 - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: upgrade npm - run: npm install -g npm - - name: npm install - run: npm install - - name: npm run lint - run: npm run lint diff --git a/.github/workflows/test-merge.yml b/.github/workflows/test-merge.yml index 219645899b..67d1e2f7a4 100644 --- a/.github/workflows/test-merge.yml +++ b/.github/workflows/test-merge.yml @@ -1,47 +1,24 @@ -name: Test Merge -on: - push: - branches: - - '**' - - '!master' - # pull_request: - # types: [opened, synchronize] +name: Test Merge Commit +on: pull_request + jobs: test-merge: runs-on: ${{ matrix.config.os }} strategy: matrix: - # chances are that we'll never break on a merge to master on just one version of node - node-version: [14.x] config: + # arch isn't used and we have no way to use it currently - { os: macos-latest, arch: x64 } - { os: ubuntu-latest, arch: x64 } - { os: windows-latest, arch: x64 } - - { os: windows-latest, arch: ia32 } steps: - - uses: actions/checkout@v1 - - name: merge master - run: git merge origin/master - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} - # https://github.com/nodejs/node-gyp/issues/1663#issuecomment-535049449 - - name: patch node gyp on windows to support Visual Studio 2019 - if: matrix.os == 'windows-latest' - shell: powershell - run: | - npm install --global node-gyp@latest - npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} - - name: upgrade npm - run: npm install -g npm - - name: npm install - run: npm install - - name: npm run rebuild - run: npm run rebuild - - name: npm test - run: npm test - - name: coverage - run: npm run coverage + node-version: 14 + - run: npm ci + - run: npm run rebuild + - run: npm test + - run: npm run coverage env: CI: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a0197b1fa0..ff5af6d859 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,43 +1,34 @@ -name: Test +name: Test / Lint on: push: - branches: - - '**' - # pull_request: - # types: [opened, synchronize] jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - run: npm ci + - run: npm run lint test: runs-on: ${{ matrix.config.os }} strategy: matrix: - node-version: [10.x, 12.x, 14.x] + node-version: [10.x, 12.x, 14.x, 16.x] config: + # arch isn't used and we have no way to use it currently - { os: macos-latest, arch: x64 } - { os: ubuntu-latest, arch: x64 } - { os: windows-latest, arch: x64 } - - { os: windows-latest, arch: ia32 } steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - # https://github.com/nodejs/node-gyp/issues/1663#issuecomment-535049449 - - name: patch node gyp on windows to support Visual Studio 2019 - if: matrix.os == 'windows-latest' - shell: powershell - run: | - npm install --global node-gyp@latest - npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} - - name: upgrade npm - run: npm install -g npm - - name: npm install - run: npm install - - name: npm run rebuild - run: npm run rebuild - - name: npm test - run: npm test - - name: coverage - run: npm run coverage + - run: npm ci + - run: npm run rebuild + - run: npm test + - run: npm run coverage env: CI: true