-
Notifications
You must be signed in to change notification settings - Fork 227
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
action: run on windows #3223
action: run on windows #3223
Conversation
I would like to have some basic testing of the APM agent on Windows, yes. However, I'd be fine if we skipped any of the test files that require an external service (like redis, postgres, etc.). diff --git a/test/instrumentation/modules/redis.test.js b/test/instrumentation/modules/redis.test.js
index 73d0962e..1fd3d8c8 100644
--- a/test/instrumentation/modules/redis.test.js
+++ b/test/instrumentation/modules/redis.test.js
@@ -9,6 +9,11 @@
const redisVersion = require('redis/package.json').version
const semver = require('semver')
+if (process.env.GITHUB_ACTIONS === 'true' && process.platform === 'win32') {
+ console.log('# SKIP: GH Actions do not support docker services on Windows')
+ process.exit(0)
+}
+
if (semver.lt(redisVersion, '4.0.0')) {
console.log('# SKIP: skipping redis.test.js tests <4.0.0')
process.exit(0) We'd need to do this to a lot of test files, but that should be okay. I can help with this if you like.
Does running it only nightly (and not on PRs) help with this issue? We still wouldn't be able to run the full test suite on a GitHub Actions windows worker. |
Thanks @trentm , I think I can take it from here. On the other hand, I'd like to extend the proposal to support external services on Windows if needed in the future with something like: if (process.env.SKIP_EXTERNAL_SERVICE_TEST === 'true' && process.platform === 'win32') { Then we could support the below workflows:
The The What do you think? |
Personally I would bias to not adding a If you choose to add the abstraction, perhaps a name like
|
I agree, if there is no need for testing those external services on Windows, then we can keep it simple. So I'll use your proposal and we can revisit in the future if there is need to support testing the external services on Windows. |
It would be nice, but it isn't worth the effort right now. If we hear from any customers about issues using on Windows, then I'll bring it up again. Thanks. |
those tests are the ones defined in the list of modules in .github/workflows/tav.yml
I've just excluded the tests on Windows for the below instrumentations:
See 1b54c5f |
…s an internal or external command"
There are some test failures on Windows: The below one seems to be solved with c44ca29:
but there is now another one:
any hints? |
@v1v Instead of the diff --git a/test/instrumentation/modules/http/github-423.test.js b/test/instrumentation/modules/http/github-423.test.js
index a00bebfb..e74e2fe5 100644
--- a/test/instrumentation/modules/http/github-423.test.js
+++ b/test/instrumentation/modules/http/github-423.test.js
@@ -54,7 +54,7 @@ test('https://github.com/elastic/apm-agent-nodejs/issues/423', function (t) {
var server = http.createServer(function (req, res) {
got(url).then(function (response) {
t.strictEqual(response.body.length, fileSize, 'body should be expected size')
- t.strictEqual(response.body.slice(0, 12), '/*\n * Copyri', 'body should be uncompressed')
+ t.ok(response.body.includes('Copyright Elasticsearch'), 'body should be uncompressed')
res.end()
})
}) |
…nd on line ending type for this test
… apparently unreliable on the GH Actions Windows runners
Co-authored-by: Ivan Fernandez Calvo <[email protected]>
This is one of the very last things to be migrated besides of the benchmarks or releases.
Background
#1393 was the original request that enabled Windows using docker linux containers for running all the required services.
Blockers
Cannot run docker containers on windows. At present docker operations is not supported on Windows runners -> actions/runner#904
Questions
Is this particular stage needed?If so, is it needed to run always on PRs? Or nightly could be a good solution?