Closed rfay closed 1 year ago
Hi, I'm interested and I guess I could start working on it next week.
I think the ddev_version
value that we pass in the matrix
could be an input of the wanted action.
This way, every add-on should look like :
jobs:
tests:
defaults:
run:
shell: bash
strategy:
matrix:
ddev_version: [stable, HEAD]
fail-fast: false
steps:
- uses: ddev/add-on-test-init@vx.y.z
with:
ddev_version: ${{ matrix.ddev_version }}
- name: tests
run: bats tests
What do you think ?
Looking forward to it!
Oh, maybe the action can be created in this repo...
Hi,
Initially, I worked in one of my repositories: https://github.com/julienloizelet/ddev-add-on-test-init
Using one of my add-on, I tested it both "locally" : https://github.com/julienloizelet/ddev-add-on-test-init/actions/runs/5504377779 and from the add-on itself: https://github.com/julienloizelet/ddev-playwright/actions/runs/5504488656
Please let me know what you think.
Some remarks:
I did not handle the "PR" ddev_version
because I was not sure if it should be supported or not. If yes, I guess we will have to add another input to specify the nighty url and there is a unzip ddev_linux.zip
directive that could be hard to handle (as I guess the name of the archive could change).
We could add the tmate debug part in the action too but this will add some complexity: the secret will have to be passed as an input.
Oh, maybe the action can be created in this repo...
Personally, I would prefer to have a separate repo for the following reasons:
it seems to be recommended : https://docs.github.com/en/actions/creating-actions/about-custom-actions#choosing-a-location-for-your-action
To be published on the GitHub marketplace, the action.yaml
file must be in the root folder of the repository: https://docs.github.com/en/actions/creating-actions/publishing-actions-in-github-marketplace#about-publishing-actions
Thus, when people will use the template to create their own add-on, the action.yaml will be copied too (I guess) and I think this is confusing.
For me, release version of the action and of the template should be independent (as well as the documentation, tests...).
Having said that, I can totally understand why you'd want to put the action in this repo. Just let me know and I could do a PR to add the action.yaml
here.
Thanks.
Fantastic! Hopefully, I can do a test run soon.
I think a separate repo is fine, especially if you'll maintain it :) It can be promoted to ddev org when ready. Thanks!
@julienloizelet DID THIS! Yay!
The test workflows for this template are repeated in every copied repo, so everything has to be updated when anything breaks, like
But I would think we could create a GitHub action that would package up most of the setup that we do, and then the action could be updated instead of having every add-on repo needing to be updated.
I would think that at least this could be done by an action:
https://github.com/ddev/ddev-addon-template/blob/eba2da81ee29c2c8dfbfb84f9513a9354ec1405e/.github/workflows/tests.yml#L47-L54
and probably this too:
https://github.com/ddev/ddev-addon-template/blob/eba2da81ee29c2c8dfbfb84f9513a9354ec1405e/.github/workflows/tests.yml#L75-L76
Any interest @tyler36 or anybody else? Could be fun!