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

[test] Get multiline action input - parse as JSON #555

Closed
wants to merge 9 commits into from

Conversation

emersonknapp
Copy link
Contributor

@emersonknapp emersonknapp commented Mar 2, 2021

Notes:
This is a test to try enabling generic solution for #526

  • By using | pipe to start multiline string, we can have core.getInput return a long string.
  • This returned string does not have line breaks - this means that YAML isn't really possible because it has syntactic newlines
  • The reason to parse as JSON in the action is to validate the input will be readable by colcon way later - otherwise the feedback would be very slow
  • After validation - we can write this file to $COLCON_HOME/defaults.yaml as per add colcon-mixin-name-build and colcon-mixin-name-test overrides #526. We could also write it anywhere and point to it via COLCON_DEFAULTS_FILE environment variable. Any JSON we expect here will be valid YAML as well.

Emerson Knapp added 2 commits March 1, 2021 18:01
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #555 (5893153) into master (cf1700f) will decrease coverage by 2.22%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #555      +/-   ##
==========================================
- Coverage   42.42%   40.19%   -2.23%     
==========================================
  Files           2        2              
  Lines         198      204       +6     
  Branches       36       36              
==========================================
- Hits           84       82       -2     
- Misses        114      122       +8     
Impacted Files Coverage Δ
src/action-ros-ci.ts 30.28% <0.00%> (-2.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf1700f...a9115df. Read the comment docs.

Emerson Knapp added 7 commits March 1, 2021 18:27
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
@emersonknapp emersonknapp changed the title Try getting yaml contents from action argument [test] Get multiline action input - parse as JSON Mar 2, 2021
emersonknapp pushed a commit that referenced this pull request Mar 10, 2021
Relates to #525, #526, #555

This adds a `colcon-defaults` input. The JSON content is validated and then
written to `COLCON_DEFAULTS_FILE`

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
@christophebedard
Copy link
Member

@emersonknapp this can be closed now that #570 has been merged

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 this pull request may close these issues.

2 participants