Various Android tests are failing because of the config munging order.
This PR changes the order of the project setup and the plugin install as a temporary workaround for Android plugin testing.
This change does not resolve the underlining issue.
Description
Example issue
Current Order of Paramedic for Reference:
Install Plugins
Install Plugins
Install Test For Existing Plugins
Install CI Testing Framework Related Plugins
Setup Project Config For Test Framework
Install Platform
Some plugins and the test plugins will inject elements into the AndroidManifest with config-file. For example, let us say the provider node is injected into the path of /manifest/application.
Next, the CI testing plugin attempts to update the /manifest/application node by appending attributes with edit-config.
Because the CI is trying to update the same node that had already been modified with config-file, it fails to merge with conflicts, even if the changes do not affect each other.
Example Solution
New Order of Paramedic for Reference:
Install Platform
Install Plugins
Install CI Testing Framework Related Plugins
Install Plugins
Install Test For Existing Plugins
Setup Project Config For Test Framework
If edit-config is applied first and then config-file is applied last, will not fail because config-file only uses the node path as a reference to where it needs to inject.
Final Note
Even though we change the order for the paramedic to resolve the issue, it only tests as if the project was being built up from scratch.
If we looked at the issue from a CI perspective, all the plugins and platforms are usually defined in package.json, and running cordova prepare could trigger the same issue as the order for installation might not be guaranteed.
More investigation into a proper solution should be performed within the cordova-common repo.
Testing
GitHub Action CI
Checklist
[x] I've run the tests to see all new and existing tests pass
[ ] I added automated test coverage as appropriate for this change
[ ] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
Motivation and Context
Various Android tests are failing because of the config munging order.
This PR changes the order of the project setup and the plugin install as a temporary workaround for Android plugin testing.
This change does not resolve the underlining issue.
Description
Example issue
Current Order of Paramedic for Reference:
Some plugins and the test plugins will inject elements into the
AndroidManifest
withconfig-file
. For example, let us say theprovider
node is injected into the path of/manifest/application
.Next, the CI testing plugin attempts to update the
/manifest/application
node by appending attributes withedit-config
.Because the CI is trying to update the same node that had already been modified with
config-file
, it fails to merge with conflicts, even if the changes do not affect each other.Example Solution
New Order of Paramedic for Reference:
If
edit-config
is applied first and thenconfig-file
is applied last, will not fail because config-file only uses the node path as a reference to where it needs to inject.Final Note
Even though we change the order for the paramedic to resolve the issue, it only tests as if the project was being built up from scratch.
If we looked at the issue from a CI perspective, all the plugins and platforms are usually defined in
package.json
, and runningcordova prepare
could trigger the same issue as the order for installation might not be guaranteed.More investigation into a proper solution should be performed within the
cordova-common
repo.Testing
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)