-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add a tests workflow upon a release in the action repo #5
Conversation
@SuperKogito the tests for the action should go in urlchecker-action so they are run whenever there is a change - just curious why did you put them here? This repo should just be a collection of static files that are used there. Then for "latest" you just refer to ./. |
I'm going to close here... looking forward to seeing the PR for the urlchecker-aciton! |
well as far as I understood, to be able to test, we need to make a release and based on that I assumed that the test-repo would be good for testing because it is similar to any user set-up. But to your point, having the tests in a different repo can be very confusing :/ |
I don't get the part about "latest" ? |
We would actually want to test the action before release, which is standard in software (or action) development. How would it work to release and then find out it’s broken? |
You made a comment that you couldn’t figure out how to test “latest” I assume referring to the current state of the repository and the answer is to reference the present working directory like ./ Take a look at the current action yml file, it’s already being done there for the brief tests that I wrote. |
Latest is a tag specifically for Docker containers, doesn’t apply here unless we explicitly created it (we did not). |
Okay, that's actually way better. Silly me thought we can only test upon release, which horrible. I will check it out and make the needed fixes ;) |
No worries! It’s been a long quarantine, most of us are a little silly at this point 😜 |
I don't think it is the quarantine in my case lol but that is nice of you to say xD |
btw I have another silly question: idk if you noticed, I am currently using |
Hmm that's a good point - so let's break down the testing into a few cases:
So here is how I would go about this:
TLDR I don't think there is anything we can do other than force_pass, and then use other methods (e.g., the output file) to validate that some extension only was checked, etc. For each test that you write, you'll likely have a run block after the run of urlchecker to validate something. And each test in urlhecker-action should correspond to some subfolder here (e.g., I currently added test_action and you can consider that a base, and add specific folders like test_pyextension, test_whitelist, etc. |
That's a nice elaborate explanation <3 you raise many valid points and I agree to the approach and the suggestions. I will get on it :) |
Add tests workflow.
Fixes trigger a workflow (tests) on urlschecker-action release #3.
Related to Add tests trigger on action release urlchecker-action#66.
This workflow is based on the following: