YunaBraska / github-workflow-plugin

Your Ultimate Wingman for GitHub Workflows and Actions! 🚀
https://github.com/YunaBraska/github-workflow-plugin
Apache License 2.0
42 stars 9 forks source link

How to associate a .yml files with this extension? #3

Closed bedge closed 11 months ago

bedge commented 1 year ago

How does one tell the intellij that a .yml file is a github actions workflow, and to apply the syntax checking and autocompletion provided by this plugin?

Doesn't appear to change anithing after this plugin is loaded.

What did you tried already? Um, nothing and I'm all out of ideas?

Operating System

OSX

Project Version

1.0.1

YunaBraska commented 1 year ago

Hi @bedge

your .ymlfile must be under .github/workflows that's the current logic Afterwards, you should see the new Schema applied to your Workflow Schema: GitHub Workflow [Auto] The Schema validation comes from https://json.schemastore.org/github-workflow - that's the current logic

Else out of my mind: 1) Look for an "Internal Error" Popup Window or the "Internal Error" symbol, which could be found in the status bar. If found, it might contain a StackTrace of the plugin. Screenshot 2023-06-12 at 08 48 50 2) If you have another supported JetBrains IDE like PyCharm which you haven't modified yet, then you could try the plugin also there. It should work. 3) Go to the "EventLog" "View" -> "Tool Windows" -> "Messages" or "Event Log" or "Notifications" and look for errors. 4) Verify plugin installation: Ensure that the plugin is properly installed and enabled in your IntelliJ IDE. You can go to "File" -> "Settings" -> "Plugins" to check if the plugin is listed and enabled. 5) Check for conflicts: Sometimes, other plugins or configurations can interfere with the plugins. Disable any other plugins that might conflict. You can disable plugins by going to "File" -> "Settings" -> "Plugins" and unchecking the corresponding checkboxes. 6) Restart IntelliJ: Restarting the IntelliJ IDE can help resolve various plugin-related issues. Try restarting IntelliJ and see if the YAML plugin starts working after that. 7) Update IntelliJ and the YAML plugin: Make sure you are using the latest version of both IntelliJ and the plugin. Updates often contain bug fixes and improvements that could address the problem you're facing. 8) Reset IntelliJ settings: If none of the above steps work, you can try resetting IntelliJ settings to their default values. To do this, go to "File" -> "Manage IDE Settings" -> "Restore Default Settings." Keep in mind that this will reset all your settings, so make sure to back up any custom configurations or preferences beforehand.

bedge commented 1 year ago

Thanks for the detailed feedback. That would be great info to put on the initial README page.

Turns out I was thinking it wasn't picking up the syntax checking because of the multiline run syntax I was using. I had:

    - name: get-metadata
      id: get-metadata
      run: |-
        set -x

rather than:

    - name: get-metadata
      id: get-metadata
      run: |
        set -x

Note the |- vs the | on the run lines. The former shows many syntax problems, yet AFAICT is still legal yaml for actions workflows.

Once I changed to |, the syntax highlighting was correct. However, I think the former should be supported as well.

YunaBraska commented 11 months ago

Sorry, it took a while as I needed to exchange the yaml parser, but now it should work also with |- Feel free to report more issues.

bedge commented 11 months ago

Much appreciated. Many thanks!