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

Fix github workflow syntax to run unit-tests on push #17148

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Jan 6, 2022

Issue:

Since d3bc320, the unit-tests github workflow has not been running on each merge to next, as it was supposed to.

What I did

I think I had the syntax incorrect for determining whether the workflow was being triggered by a push (or alternatively by a pull_request). This instead uses the github.event_name as shown here: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-using-contexts

I also removed the ${{}} syntax, since it is optional, as mentioned in https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-using-contexts:

When you use expressions in an if conditional, you may omit the expression syntax (${{ }}) because GitHub automatically evaluates the if conditional as an expression. For more information, see "Expressions."

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

😬 I think the only real way to test this is to verify that the workflow does not happen when I open this PR, and then someone should add the ci:matrix label and verify it does run, then the real test comes if/when it is merged, to see if the workflow runs on next.

@nx-cloud
Copy link

nx-cloud bot commented Jan 6, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit e0c0a14. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@IanVS IanVS requested a review from shilman January 6, 2022 17:15
@IanVS IanVS added the maintenance User-facing maintenance tasks label Jan 6, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎖️

@shilman shilman merged commit 7343df9 into next Jan 10, 2022
@shilman shilman deleted the re-enable-windows-tests branch January 10, 2022 14:49
@IanVS
Copy link
Member Author

IanVS commented Jan 10, 2022

Thanks, looks like it's working as intended now.

image

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

Successfully merging this pull request may close these issues.

2 participants