You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
tests: setup GitHub Actions to replace Travis (#1497)
Additionally adds testing against many Node.js versions and Redis versions.
This commit is contained in:
@@ -11,20 +11,17 @@ var fork = require('child_process').fork;
|
||||
var redis = config.redis;
|
||||
var client;
|
||||
|
||||
// Currently Travis Windows builds hang after completing if any processes are still running,
|
||||
// we shutdown redis-server after all tests complete (can't do this in a
|
||||
// `after_script` Travis hook as it hangs before the `after` life cycles)
|
||||
// to workaround the issue.
|
||||
//
|
||||
// See: https://github.com/travis-ci/travis-ci/issues/8082
|
||||
// Currently GitHub Actions on Windows (and event travis) builds hang after completing if
|
||||
// any processes are still running, we shutdown redis-server after all tests complete (can't do this in a
|
||||
// `after_script` hook as it hangs before the `after` life cycles) to workaround the issue.
|
||||
after(function (done) {
|
||||
if (process.platform !== 'win32' || !process.env.CI) {
|
||||
if (process.platform !== 'win32' || !process.env.GITHUB_ACTION) {
|
||||
return done();
|
||||
}
|
||||
process.nextTick(function () {
|
||||
setTimeout(function () {
|
||||
require('cross-spawn').sync('redis-server', ['--service-stop'], {});
|
||||
done();
|
||||
});
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
describe('The node_redis client', function () {
|
||||
|
Reference in New Issue
Block a user