I’m setting up a new plugin based on the skeleton you provided which already helped me a lot.
I am now writing tests, both for the frontend and the backend. Everything works as expected in Discourse dev environment, including acceptance tests which work like a charm.
My workflow file is as simple as:
name: Discourse Projects Plugin - CI
on:
push:
branches: [ main ]
jobs:
discourse:
uses: discourse/.github/.github/workflows/discourse-plugin.yml@v1
But when I try to run the workflow on Github Actions, I’m getting a curious error in the frontend_tests / Plugin QUnit step:
Built project successfully. Stored in "/tmp/tests-dist-20231022-6082-zjfckn.1g5q".
not ok 1 Chrome 119.0 - [180 ms] - global failure
---
stack: >
Error: No tests were run.
at done (http://localhost:7357/assets/chunk.74084cb2759545d0c671.js:108653:17)
at advanceTestQueue (http://localhost:7357/assets/chunk.74084cb2759545d0c671.js:108565:7)
at Object.advance (http://localhost:7357/assets/chunk.74084cb2759545d0c671.js:108520:7)
at unblockAndAdvanceQueue (http://localhost:7357/assets/chunk.74084cb2759545d0c671.js:110490:21)
message: >
No tests were run.
negative: >
false
browser log: |
{"type":"log","text":"ℹ️ Ember v3.28.12"}
...
Out of requested 1 browser(s), 1 browser(s) was launched & completed.
All browsers to exited.
Used JS Heap Size: 0.073GB
Apart from that, I don’t get any details, even when running the workflow again with debug logging. All other steps in the workflow are done correctly (linters, rspec, etc).
So my questions are simple:
is the free Github runner enough to run acceptance step?
any clue how I can troubleshoot this?
I’m certain I’m doing something wrong somewhere but I’ve no idea where to start looking.
Thanks for your help and all the work done on Discourse!
Hello Pierre! We agree that the developer experience can be better in some aspects and I am trying to figure out how did you come across this problem and what we can do to help you and future developers have a more pleasant experience.
How do you run the acceptance tests locally?
Have you defined any tests in the test/javascripts directory?
In fact, your question led me to try to understand why it was detecting no test. So I checked the workflow you provide and I see that Qunit is executed with the “PLUGIN_NAME” which is filled with the repository name.
In my case, the repository name is different from the plugin name. There is even a warning about this in the job logs. I’m gonna try to rename the repository accordingly and I’ll keep you posted