Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add travis for continuous integration testing #2

Merged
merged 5 commits into from
Jul 21, 2020
Merged

add travis for continuous integration testing #2

merged 5 commits into from
Jul 21, 2020

Conversation

cesine
Copy link
Owner

@cesine cesine commented Jul 21, 2020

How this was tested

Screen Shot 2020-07-21 at 3 56 49 PM

Node <= 0.12 https://travis-ci.com/github/cesine/grunt-eco/jobs/363481531 fails due to mde/ejs#534

/home/travis/build/cesine/grunt-eco/node_modules/grunt-contrib-nodeunit/node_modules/nodeunit-x/node_modules/ejs/postinstall.js:9
let envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.
^^^
SyntaxError: Unexpected strict mode reserved word

Node <= 6 https://travis-ci.com/github/cesine/grunt-eco/jobs/363475715 fails due to mkdirp

$ grunt
/home/travis/build/cesine/grunt-eco/node_modules/mkdirp/lib/opts-arg.js:7
    opts = { mode: 0o777, fs, ...opts }
                              ^^^
SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/travis/build/cesine/grunt-eco/node_modules/mkdirp/index.js:1:79)
The command "grunt" exited with 1.
cache.2
store build cache
0.00s1.62snothing changed
Done. Your build exited with 1.
$ npm ls mkdirp
grunt-eco@0.1.3 /Users/gchiodo/git/grunt-eco
├─┬ grunt@1.2.1
│ └── mkdirp@1.0.4
└─┬ grunt-contrib-nodeunit@2.1.0
  └─┬ nodeunit-x@0.13.0
    └─┬ tap@12.7.0
      ├── mkdirp@0.5.5
      └─┬ nyc@14.1.1
        └─┬ spawn-wrap@1.4.3
          └── mkdirp@0.5.5

The root cause is mkdir is using es6 after v 1.0.0 isaacs/node-mkdirp@ed0ae94#diff-3ca2c4508c333566c2fe17e2a75c5863

and grunt dropped support for older versions of node in gruntjs/grunt@4bfa98e#diff-b9cfc7f2cdf78a7f4b91a753d10865a2 v 1.1.0

  • Lock the dev deps of grunt to be able to verify older node versions are working with this lib in CI (keep the peer dep open-ended so that consumers have flexibilty) a52a148

Node > 8 https://travis-ci.com/github/cesine/grunt-eco/jobs/363475717#L216

$ grunt
(node:5175) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
Running "jshint:gruntfile" (jshint) task
>> 1 file lint free.
Running "jshint:tasks" (jshint) task
>> 1 file lint free.
Running "jshint:tests" (jshint) task
>> 1 file lint free.
Running "clean:test" (clean) task
>> 0 paths cleaned.
Running "eco:filesTest" (eco) task
File tmp/filesTest/all.js created.
File tmp/filesTest/flatOnly.js created.
Running "eco:srcDestTest" (eco) task
File tmp/srcDestTest/all.js created.
Running "eco:expandTest" (eco) task
File tmp/expandTest/tests/fixtures/advanced-example.js created.
File tmp/expandTest/tests/fixtures/empty.js created.
File tmp/expandTest/tests/fixtures/example.js created.
File tmp/expandTest/tests/fixtures/nested/example.js created.
Running "eco:basePathStringTest" (eco) task
File tmp/basePathStringTest/all.js created.
Running "eco:basePathFunctionTest" (eco) task
File tmp/basePathFunctionTest/all.js created.
Running "eco:amdTest" (eco) task
File tmp/amdTest/tests/fixtures/advanced-example.js created.
File tmp/amdTest/tests/fixtures/empty.js created.
File tmp/amdTest/tests/fixtures/example.js created.
File tmp/amdTest/tests/fixtures/nested/example.js created.
Running "eco:noJstGlobalCheckTest" (eco) task
File tmp/noJstGlobalCheckTest/all.js created.
Running "nodeunit:tests" (nodeunit) task
Testing eco_test.js.......OK
>> 12 assertions passed (6ms)
Done.
The command "grunt" exited with 0.
cache.2
store build cache
Done. Your build exited with 0.

@cesine cesine merged commit 998569b into master Jul 21, 2020
@cesine cesine deleted the travis branch July 22, 2020 16:12
@chenhb-zte
Copy link

HI How was the issue of mkdirp fixed on node 6 ? grunt can not run well on node 6.

@cesine
Copy link
Owner Author

cesine commented Jul 23, 2020

Hi @chenhb-zte this is how I fixed node 6: I locked the version of grunt to the version which was using mkdirp 0.x a52a148

@chenhb-zte
Copy link

Hi @chenhb-zte this is how I fixed node 6: I locked the version of grunt to the version which was using mkdirp 0.x a52a148

THANKS ! it worked well like you said.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants