1

I'm currently doing a pipeline in github actions that runs integration tests on Windows. Some of these integration tests are using QT to test the UI and are actually rendering interfaces.

When I execute the following command works in powershell terminal manually:

Start-Process -FilePath ".\Layout_test.exe" -Wait -ArgumentList "-my", "args"

Everything works just fine and the different UIs start rendering (I see them)

However, when I execute the same in github actions:

- name: Test
  working-directory: C:\build
  env: 
    QA_OPENGL: angle
    QMLSCENE_DEVICE: softwarecontext
  shell: powershell
  run: |
    Start-Process -FilePath ".\Layout_test.exe" -Wait -ArgumentList "-my", "args"

The command hangs indefinitely without rendering anything, completing or outputting any log/error.
I am not entirely sure what am I missing here? Do I need to do something special and maybe run the process in foreground, perhaps?

tftd
  • 16,203
  • 11
  • 62
  • 106
  • How about `.\Layout_test -my args`? – js2010 Mar 13 '23 at 15:23
  • Unfortunately it produces the same problem -- runs indefinitely without actually doing anything. – tftd Mar 13 '23 at 15:25
  • 3
    How does your pipeline login to Windows? Is it an interactive login? – stackprotector Mar 13 '23 at 16:50
  • @stackprotector it looks like you are on to something! The `github runner` is configured to run using the `network service` account. If I start it manually via cmd under the currently logged in user -- the test works fine. Is there a way to make it work the same way via a service account? – tftd Mar 13 '23 at 20:40
  • 2
    Have a look at https://stackoverflow.com/a/4237283/45375. – mklement0 Mar 13 '23 at 21:08
  • @mklement0 thanks for the link! I've tried that, but it looks like it still hangs without any real error. The only way it works is if you start the runner manually from cmd. Are there any policies I might need to enable for the service account to work? :/ – tftd Mar 14 '23 at 15:03
  • @tftd, note that to stand any chance of making this work (I don't know if it will), you need to modify the service installation to run as `SYSTEM` and with the `SERVICE_INTERACTIVE_PROCESS` flag, and that there's an additional registry setting that needs to be changed. Also note that interactive services are discouraged. However, it looks like you're fighting the fundamental nature of CI/CD tasks: to run in an automated, unattended fashion. – mklement0 Mar 14 '23 at 21:36

0 Answers0