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

Move Test and Build of Templates to GitHub Actions #41

Closed
mxro opened this issue Jan 5, 2022 · 3 comments
Closed

Move Test and Build of Templates to GitHub Actions #41

mxro opened this issue Jan 5, 2022 · 3 comments

Comments

@mxro
Copy link
Collaborator

mxro commented Jan 5, 2022

Goldstack currently runs end to end tests for templates using AWS ECS containers. It is a bit difficult to access the logs for these tests and assert what exactly has been tested.

It could be a better option to use GitHub action runners to run these tests, possibly by checking out the source code for the templates into seperate repositories.

First implementation:

  • Create a new workflow to run the template management cli commands to test and update templates

Possible Future Implementation:

  • Checkout example repository for template / a different repository for every template
  • Delete all files in repository, with exception of GitHub workflows
  • Install files from Goldstack template into repository
  • Customise files as done in build sets currently
  • Commit & Push
  • The workflows in the template repository should then run tests for this repository (build & deploy)
@mxro
Copy link
Collaborator Author

mxro commented Jan 7, 2022

This may fix #42

@mxro
Copy link
Collaborator Author

mxro commented Jan 8, 2022

Encountered a strange error when running yarn install for the templates to be tested in Post-resolution validation

 YN0000: ┌ Post-resolution validation
Post-resolution validation
  ➤ YN0000: │ @@ -4,96 +4,8 @@
  ➤ YN0000: │  __metadata:
  ➤ YN0000: │    version: 4
  ➤ YN0000: │    cacheKey: 8
  ➤ YN0000: │  
  ➤ YN0028: │ -"@ampproject/toolbox-core@npm:^2.5.4":
  ➤ YN0028: │ -  version: 2.5.4
  ➤ YN0028: │ -  resolution: "@ampproject/toolbox-core@npm:2.5.4"
  ➤ YN0028: │ -  dependencies:
  ➤ YN0028: │ -    cross-fetch: 3.0.5
  ➤ YN0028: │ -    lru-cache: 5.1.1
  ➤ YN0028: │ -  checksum: 93a33af4a8dbc6d43df6f2502296eded3ad9cd389781e803e483bd365a11ae9cd4ef93a468562f72fdd840a33ebf4c726c5cc934127cc9ca82a98dcefba6e228
  ➤ YN0028: │ -  languageName: node
  ➤ YN0028: │ -  linkType: hard
  ➤ YN0028: │ -
  ➤ YN0028: │ -"@ampproject/toolbox-optimizer@npm:^2.5.14":
  ➤ YN0028: │ -  version: 2.5.14
  ➤ YN0028: │ -  resolution: "@ampproject/toolbox-optimizer@npm:2.5.14"
  ➤ YN0028: │ -  dependencies:
  ➤ YN0028: │ -    "@ampproject/toolbox-core": ^2.5.4
...

This appears to happen when first running yarn install for the project that hosts the template management cli (goldstack-mega) and then running yarn install again for the generated template.

Could not find much information on error with yarn validation apart from something that seems not related heroku/heroku-buildpack-nodejs#910 although this refers to the same error code YN0028

Clearning the Yarn cache does not appear to help.

A bit difficult to debug since there is no --verbose option for Yarn 2/Berry.

Trying to overwrite global cache dir used using: https://yarnpkg.com/cli/config/set does not seem to work neither.

Also deleting the yarn.lock file does not seem to work, since then a ➤ YN0028: The lockfile would have been created by this install, which is explicitly forbidden. error is reported.

Solution: Immutable installs are enabled by default in CI renovatebot/renovate#9481 (comment) - see yarnpkg/berry#2530 - but not in a local dev environment. By manually setting yarn config set enableImmutableInstalls false' in the CI, this error does not appear anymore.

@mxro mxro changed the title Move Testing of Templates to GitHub Actions Move Test and Build of Templates to GitHub Actions Jan 8, 2022
@mxro
Copy link
Collaborator Author

mxro commented Jan 8, 2022

Deployment and test migrated to GitHub Actions.

@mxro mxro closed this as completed Jan 8, 2022
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

No branches or pull requests

1 participant