-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: allow specifying expected images directory #148
base: main
Are you sure you want to change the base?
feat: allow specifying expected images directory #148
Conversation
This way, it is not needed to find previous runs and download an artifact. Instead, the images are copied from the expected images directory and compared immediately.
@bokuweb friendly ping, any chance you might have capacity to look at this PR? 🙏 |
@kopancek thanks!i'l l check |
src/config.ts
Outdated
@@ -114,6 +118,8 @@ export const getConfig = (): Config => { | |||
const imageDirectoryPath = core.getInput('image-directory-path'); | |||
validateGitHubToken(githubToken); | |||
validateImageDirPath(imageDirectoryPath); | |||
const expectedImagesDirectoryPath = core.getInput('expected-images-directory-path') ?? null; | |||
validateImageDirPath(imageDirectoryPath, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it is not needed to add allowEmpty
flag.
validateImageDirPath(imageDirectoryPath, true); | |
if (expectedImagesDirectoryPath) { | |
validateImageDirPath(expectedImagesDirectoryPath); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, bad code from me. Changed accordingly, but using a null
check instead.
This way, it is not needed to find previous runs and download an artifact. Instead, the images are copied from the expected images directory and compared immediately.