mheap / phpunit-matcher-action

Add annotations to your PHPUnit tests when running under Github Actions
32 stars 6 forks source link

Error when .github folder does not exist #7

Closed Xerkus closed 2 years ago

Xerkus commented 2 years ago

I use docker container built in previous job to run tests and as such I do not checkout the code and .github folder is not present.

Action errors out trying to write matcher file in non-existent folder.

internal/fs/utils.js:220
    throw err;
    ^

Error: ENOENT: no such file or directory, open '.github/phpunit-failure.json'
    at Object.openSync (fs.js:440:3)
    at Object.writeFileSync (fs.js:1265:35)
    at Object.<anonymous> (/home/runner/work/_actions/mheap/phpunit-matcher-action/v1/index.js:28:6)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '.github/phpunit-failure.json'
}