From 798a4abed93292415b29350df57c6724998da578 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Sat, 14 Jul 2018 00:13:01 -0700 Subject: [PATCH] test(sassspec): run sasspec --- .circleci/config.yml | 18 +++--------------- circle.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 15 deletions(-) create mode 100755 circle.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 77dcaad..15ad75b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,11 +7,7 @@ jobs: working_directory: ~/node8 steps: - checkout - - run: npm install - - run: npm run build - - run: - name: Run tests - command: node ./dist/src/cli.js + - run: ./circle.sh "node-9": docker: @@ -19,11 +15,7 @@ jobs: working_directory: ~/node9 steps: - checkout - - run: npm install - - run: npm run build - - run: - name: Run tests - command: node ./dist/src/cli.js + - run: TEST=true ./circle.sh "node-10": docker: @@ -31,11 +23,7 @@ jobs: working_directory: ~/node10 steps: - checkout - - run: npm install - - run: npm run build - - run: - name: Run tests - command: node ./dist/src/cli.js + - run: ./circle.sh workflows: version: 2 diff --git a/circle.sh b/circle.sh new file mode 100755 index 0000000..e5d1ace --- /dev/null +++ b/circle.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# simple wrapper script to be used in circle ci. + +set -e +set -o pipefail + +CLI="./dist/cli.bundle.js" +npm install +npm run build + +if [ "$TEST" = "true" ]; then + sudo apt-get install ruby-full + sudo gem install bundler + git clone https://github.com/sass/sass-spec + pushd sass-spec + git config user.name "OJ Kwon" && git config user.email "kwon.ohjoong@gmail.com" + + # TODO: verify correct way to run sass-spec against matching version + git checkout v3.5.4 + git cherry-pick 106e6d4c2e35bda22238539e978acdd60e153fb9 + + # The following tests pass but were marked as TODO for libsass: (i.e https://travis-ci.org/sass/libsass/jobs/399963285) + # TODO: why --probe-todo doesn't work? + rm -rf spec/libsass-closed-issues/issue_2360 + rm -rf spec/sass/import/unquoted + + sudo bundle install + popd + ruby ./sass-spec/sass-spec.rb -V 3.5 -c 'SASS_SPEC=true node ./dist/cli.bundle.js --root ./sass-spec' --impl libsass --probe-todo -s sass-spec/spec +else + node $CLI -v +fi \ No newline at end of file