Skip to content
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

generate output doesn't seem to work by default in CI #285

Closed
3 tasks done
Tohaker opened this issue May 3, 2024 · 1 comment · Fixed by #286
Closed
3 tasks done

generate output doesn't seem to work by default in CI #285

Tohaker opened this issue May 3, 2024 · 1 comment · Fixed by #286

Comments

@Tohaker
Copy link

Tohaker commented May 3, 2024

Describe the bug

I've integrated gql.tada into my project and it works perfectly locally. I've decided to keep my remote as clear of generated files as possible so I'm not committing the graphql-env.d.ts file generated, and instead am opting to generate it in my GitHub CI pipelines.

However, just running gql.tada generate output in CI seems to print it out to the console and not look at the path I have setup in my tsconfig.json. An example is this run; https://github.com/Tohaker/bioniQL/actions/runs/8938714273/job/24553391592

Instead, setting the output on the command explicitly makes it work, as shown in this run; https://github.com/Tohaker/bioniQL/actions/runs/8938783801/job/24553588714

It's not a huge deal, but based on the documentation I expected the former to work as it does locally.

Reproduction

Tohaker/bioniQL#103

gql.tada version

1.6.3

Validations

  • I can confirm that this is a bug report, and not a feature request, RFC, question, or discussion, for which GitHub Discussions should be used
  • Read the docs.
  • Follow our Code of Conduct
@kitten
Copy link
Member

kitten commented May 3, 2024

This seems to be caused by the GitHub Actions runner not reporting itself as a full TTY. If the command is not wrapped in a shell, then output piping will also not work correctly and be erroneously detected.

Writing to tadaOutputLocation is a default, so that's only done when the command is detected to not be piped to a non-TTY output. However, it seems that this never really works on GitHub, so we'll just have to disable piping detection via isTTY entirely (note: isatty returns the same result)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants