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

This repo needs tests #6

Open
brian-rose opened this issue Oct 4, 2022 · 7 comments · May be fixed by #7
Open

This repo needs tests #6

brian-rose opened this issue Oct 4, 2022 · 7 comments · May be fixed by #7
Assignees
Labels
hackathon Issue highlighted for active hackathon session infrastructure Infrastructure related issue

Comments

@brian-rose
Copy link
Member

In ProjectPythia/cookbook-template#61 I'm working on refactoring how we handle all the Cookbook actions to reduce boilerplate in each Cookbook repo and centralize more of the workflow code here. This is great from a maintenance perspective. But it creates a new problem:

Changes to this repo (e.g. updating versions of its dependencies) won't directly trigger any useful tests. We currently need to wait until one or more of the Cookbook repos fail before knowing there's a problem.

One approach might be to trigger a test build of the Cookbook Template repo on every PR to this repo.

@brian-rose
Copy link
Member Author

brian-rose commented Oct 4, 2022

I think it may be possible to write a workflow triggered by PRs to this repo that

  1. checks out the Template repo
  2. runs a build on that repo, using the latest versions of the build-book.yaml etc that are in the PR.
  3. Displays a preview of that build, again using the latest versions of the yaml files.

That should be an effective way to make sure changes in each PR don't break anything. Displaying the preview would require turning on GitHub Pages for this repo.

Workflow code to check out a different repo should look like this:

- name: Check out my other repo
        uses: actions/checkout@v3
        with:
          repository: orgname/reponame

@brian-rose brian-rose linked a pull request Oct 4, 2022 that will close this issue
@brian-rose
Copy link
Member Author

@ProjectPythiaCookbooks/infrastructure I think this is a high priority since we're relying on the infrastructure in this repo, so I took the liberty of labelling it as such. I need some help with implementing a solution.

@brian-rose
Copy link
Member Author

@ProjectPythia/infrastructure I want to draw attention to this as a high-priority issue.

With ProjectPythia/pythia-foundations#367 and ProjectPythia/projectpythia.github.io#310, almost all of our content (including Foundations and the portal site) is now depending on the workflows in this repo. But this repo doesn't have its own tests, so failures due to upstream changes would only be caught indirectly via their effects on our nightly builds in other repos.

Designing proper tests for this repo is non-trivial, as I outlined above. It would be great to get someone assigned to look into this.

@dcamron
Copy link

dcamron commented Feb 9, 2023

I'm going to start on this. I'll start with the goal for now of "check if cookbook-template builds successfully provided changes to these actions". Let me know if anything else comes up as important to check, and I might ask some questions here as I dig in.

@dcamron dcamron self-assigned this Feb 9, 2023
@brian-rose
Copy link
Member Author

I'm going to start on this. I'll start with the goal for now of "check if cookbook-template builds successfully provided changes to these actions". Let me know if anything else comes up as important to check, and I might ask some questions here as I dig in.

I think that's the right approach.

The important detail to keep an eye on is to make sure the correct version of the actions are called. The workflow files in the template repo point specifically to the main branch of this repo, so if you just run them without modification, they won't be testing any new changes in the PR on this branch.

@dcamron
Copy link

dcamron commented Apr 17, 2023

ProjectPythia/cookbook-template#100 (comment) a note about confirming our testing methodology across actions. This may deserve its own issue.

@brian-rose brian-rose added the hackathon Issue highlighted for active hackathon session label Jun 12, 2023
@clyne
Copy link

clyne commented Aug 21, 2023

Highest priority item for Drew at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hackathon Issue highlighted for active hackathon session infrastructure Infrastructure related issue
Projects
Status: On Pause
Development

Successfully merging a pull request may close this issue.

4 participants