From fdfeed3a61b63250e18570814f7e9200d30e507e Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 4 May 2018 11:09:44 -0700 Subject: [PATCH] Run stylelint's tests during our CI tests. --- .gitmodules | 3 ++- .npmignore | 1 + .travis.yml | 17 +++++++++++++++-- integration/stylelint | 2 +- integration_test.sh | 12 ++++++++++++ package-lock.json | 2 +- package.json | 2 +- 7 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 .npmignore create mode 100755 integration_test.sh diff --git a/.gitmodules b/.gitmodules index 19e84cd..1b4258a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "integration/stylelint"] path = integration/stylelint - url = https://github.com/stylelint/stylelint.git + url = https://github.com/chriseppstein/stylelint.git + branch = selector-parser-4.0 diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..58d03f9 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +integration/*/ diff --git a/.travis.yml b/.travis.yml index 0a0c34b..5f55f95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,24 @@ sudo: false language: node_js matrix: include: + - node_js: '10' + env: INTEGRATION=false - node_js: '8' - - node_js: '7' + env: INTEGRATION=true - node_js: '6' + env: INTEGRATION=false - node_js: '5' + env: INTEGRATION=false - node_js: '4' - + env: INTEGRATION=false +install: + - npm install -g npm@latest + - npm ci +script: + - npm test + - ./integration_test.sh +cache: + directories: + - ~/.npm after_success: - './node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls' diff --git a/integration/stylelint b/integration/stylelint index ae95109..923878c 160000 --- a/integration/stylelint +++ b/integration/stylelint @@ -1 +1 @@ -Subproject commit ae95109c4e0c4523868a38587e9803d1786a86fc +Subproject commit 923878cfec814570392101c232942d63a80b2af0 diff --git a/integration_test.sh b/integration_test.sh new file mode 100755 index 0000000..9a9a5ce --- /dev/null +++ b/integration_test.sh @@ -0,0 +1,12 @@ +#!/bin/bash +if [[ $INTEGRATION == "false" ]]; then + exit 0; +fi +git submodule update --init --recursive +npm link +cd integration/stylelint +npm link postcss-selector-parser +npm install +NODE_VERSION=`node -e "console.log(process.version.replace(/v(\d).*/,function(m){return m[1]}))"` +CI="tests $NODE_VERSION" +npm run jest -- --maxWorkers=2 --testPathIgnorePatterns lib/__tests__/standalone-cache.test.js || exit $? diff --git a/package-lock.json b/package-lock.json index 93bdb94..95d6ed2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "postcss-selector-parser", - "version": "4.0.0-rc.1", + "version": "5.0.0-rc.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5f2c3ea..a724bf3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-selector-parser", - "version": "4.0.0", + "version": "5.0.0-rc.0", "devDependencies": { "ava": "^0.24.0", "babel-cli": "^6.4.0",