Skip to content

test suddenly failing on Github Action Windows #1037

Open
@jeffcrouse

Description

@jeffcrouse

I am building my electron app with action-electron-builder via a Github Action and for almost a year it's been working fine.

Suddenly, this week, the super-basic spectron sanity test that I run before building has started failing about 75-80% of the time on Windows. In other words, I just keep running it until it passes, and usually it takes 4-5 attempts. The app (and the test) run fine locally.

It still passes on Mac like it always has.

The Test

describe('Deploy Test', function () {
	this.timeout(20000);
	
	// --------------------------------------------------------------------------
	before(function () {
		this.app = new Application({
			path: electronPath,
			args: [path.join(__dirname, '..')]
		})

		return this.app.start();
	}) /* end before() */

	// --------------------------------------------------------------------------
	it('shows an initial window', function () {
		return this.app.client.getWindowCount().then((count) => {
			count.should.equal(1);
		});
	})

    // --------------------------------------------------------------------------
    after(function () {
        if (this.app && this.app.isRunning()) {
            return this.app.stop()
        }
    })
})

The error message:

  1) Deploy Test
       "before all" hook for "shows an initial window":
     Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (D:\a\citizen-browser-app\citizen-browser-app\test\deploy.js)
      at listOnTimeout (internal/timers.js:557:17)
      at processTimers (internal/timers.js:500:7)

I'm using electron 13.0.1 and spectron 15.0.0.

All signs point to this being something that changed on the Github side, but I was hoping to get some hints about what it might be here so that I know what to look for.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions