1
0
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:
Mike Diarmid
2020-02-11 00:17:09 +00:00
committed by GitHub
parent 61318e6ed6
commit f2050f9daf
13 changed files with 204 additions and 62 deletions

View File

@@ -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 () {