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

Run Gemfile.devel in Github Actions with metanorma-cli #317

Closed
opoudjis opened this issue Nov 27, 2023 · 10 comments
Closed

Run Gemfile.devel in Github Actions with metanorma-cli #317

opoudjis opened this issue Nov 27, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@opoudjis
Copy link
Contributor

As alerted in metanorma/isodoc#546 , Gemfile.devel is ignored in GitHub Actions when running metanorma-cli. Alex has done some fixes, which have made it possible for the metanorma-cli spec file to run correctly with the Gemfile.devel branches of underlying gems. But the samples it contains are still being run with the main branch as far as I can tell: they are crashing in the XSLT preprocessing line of the main branch of isodoc, which is different from the corresponding line in the branch of isodoc named in Gemfile.devel.

As I have found in my own running of metanorma-cli, any system calls to metanorma need to be put as bundle exec metanorma, in order to pick up the Gemfile.devel; it may also be that the system calls are not picking up Gemfile.devel in their environment.

I am doing a new release which may address the bug I'm trying to rectify; but the ability to run samples with branches named in Gemfile.devel in GitHub Actions remains a requirement. Especially if the fix I'm working with fails.

@opoudjis opoudjis added the bug Something isn't working label Nov 27, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Nov 27, 2023
@CAMOBAP
Copy link
Contributor

CAMOBAP commented Nov 27, 2023

As I have found in my own running of metanorma-cli, any system calls to metanorma need to be put as bundle exec metanorma, in order to pick up the Gemfile.devel; it may also be that the system calls are not picking up Gemfile.devel in their environment.

According to my understanding we have to avoid any system("metanorma ...") calls in specs

But the samples it contains are still being run with the main branch

Sorry I completely missing this part, i'm not sure how easy it will be to automate it, but let me try

@opoudjis
Copy link
Contributor Author

According to my understanding we have to avoid any system("metanorma ...") calls in specs

Perhaps, but it's not my code, it's @abunashir ’s, and I'm disinclined to be the one to fix it. And the point of this spec is to test that the system call to metanorma is working.

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Nov 27, 2023

Samples/templates testing now should take in account Gemfile.devel restarting CI

Update: link to the run https://github.com/metanorma/metanorma-cli/actions/runs/6963118635

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Nov 27, 2023

Test failed, one more update required, will rerun CI soon

Update: link to the run https://github.com/metanorma/metanorma-cli/actions/runs/6963118635

@opoudjis
Copy link
Contributor Author

It's working, as I confirmed last night. Ticket stays open until the various random errors on running template also go away.

@opoudjis
Copy link
Contributor Author

The new issue with templates appears to be mostly 2.7, and GHA hanging at:

  if [ "3.2" = "2.7" ]; then
    gem install lightly -v 0.3.3
  fi
  gem install metanorma-cli

https://github.com/metanorma/metanorma-cli/actions/runs/7011812490

@ronaldtse
Copy link
Contributor

As a matter of principle I think version constraints must be stated in the gemspec, not in build scripts.

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Nov 28, 2023

This one was a workaround which I hope can be removed already, I will do after release

@opoudjis
Copy link
Contributor Author

opoudjis commented Dec 5, 2023

@CAMOBAP can this issue close?

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Dec 5, 2023

@opoudjis I hope so

@CAMOBAP CAMOBAP closed this as completed Dec 5, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Metanorma Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants