Skip to content

Commit

Permalink
fix: drop node 10 support (#94)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: this moves our `engines` support and testing matrix
forward to node12 LTS and above.
  • Loading branch information
wraithgar committed Oct 5, 2021
1 parent 4217bee commit a0d4c60
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 29 deletions.
68 changes: 40 additions & 28 deletions .github/workflows/ci.yml
@@ -1,39 +1,51 @@
name: CI

on: [push, pull_request]
on:
pull_request:
push:
branches:
- main
- latest

jobs:
build:
#todo: add linting!
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: '16'
# cache: npm
# - run: npm i --prefer-online -g npm@latest
# - run: npm ci
# - run: npm run lint

test:
strategy:
fail-fast: false
matrix:
node-version: [10.x, 12.x, 14.x, 15.x, 16.x]
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.x]
# todo: add windows-latest to this list.
# Right now, it's just too flaky and hard to get PWD and HOME out
# of all the snapshots properly.
# Right now, it's just too flaky and hard to get PWD and HOME out of
# all the snapshots properly.
os: [ubuntu-latest, macOS-latest]
fail-fast: false

runs-on: ${{ matrix.os }}

platform:
- os: ubuntu-latest
shell: bash
- os: macos-latest
shell: bash
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- name: Checkout Repository
uses: actions/checkout@v1.1.0

- name: Use Nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

# Run for all environments
- name: Run Tap Tests
run: npm test

# Push coverage for specific environment
- name: Run Tap Tests (push coverage results)
if: matrix.os == 'macOS-latest' && matrix.node-version == '12.x'
run: npm test
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
cache: npm
- run: npm i --prefer-online -g npm@latest
- run: npm ci
- run: npm test --ignore-scripts
- run: npm ls -a
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -54,7 +54,7 @@
"tar": "^6.1.0"
},
"engines": {
"node": ">=10"
"node": "^12.13.0 || ^14.15.0 || >=16"
},
"repository": "git@github.com:npm/pacote"
}

0 comments on commit a0d4c60

Please sign in to comment.