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

if-nodejs-pr-testing.yml does not test on Windows #278

Closed
jonaslagoni opened this issue Mar 15, 2024 · 4 comments · Fixed by #280
Closed

if-nodejs-pr-testing.yml does not test on Windows #278

jonaslagoni opened this issue Mar 15, 2024 · 4 comments · Fixed by #280

Comments

@jonaslagoni
Copy link
Member

Problem workflow:

The following code is not compatible with Windows:

      - if: >
          !github.event.pull_request.draft && !(
            (github.actor == 'asyncapi-bot' && (
              startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || 
              startsWith(github.event.pull_request.title, 'chore(release):')
            )) ||
            (github.actor == 'asyncapi-bot-eve' && (
              startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || 
              startsWith(github.event.pull_request.title, 'chore(release):')
            )) ||
            (github.actor == 'allcontributors[bot]' && 
              startsWith(github.event.pull_request.title, 'docs: add')
            )
          )
        id: should_run
        name: Should Run
        run: echo "shouldrun=true" >> $GITHUB_OUTPUT

More specifically, I think the problem lies with run: echo "shouldrun=true" >> $GITHUB_OUTPUT.

We have two options as I see it.

  1. We change the run command to be compatible with any system
  2. We remove the check entirely.

Not sure which is the best approach.

@derberg
Copy link
Member

derberg commented Mar 27, 2024

thanks for reporting

we cannot remove the check as then we are back in problem that PR tests run on every single PR, even these from bots where PR test is not needed - so yeah - our CI will cry

we need to improve check and basically have different approach if os is windows

looks like in general a known issue -> actions/runner#2224

most voted solution is actions/runner#2224 but to be honest adding shell: bash sounds best for me, as I understand it means that bash is then enforced to use also in windows.

@jonaslagoni the best approach would be if you could apply the fix first in your repo, and if it works there, then we can push fix through here? thoughts?

@jonaslagoni
Copy link
Member Author

Trying here: asyncapi/modelina#1912

@jonaslagoni
Copy link
Member Author

@derberg
Copy link
Member

derberg commented Apr 2, 2024

oh, yeah, thanks

I also noticed we already use this approach in another step https://github.com/asyncapi/.github/blob/master/.github/workflows/if-nodejs-pr-testing.yml#L48

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