Skip to content

Fix config tests - #2388

Merged
nvuillam merged 15 commits into
oxsecurity:mainfrom
bdovaz:feature/fix-tests
Feb 26, 2023
Merged

Fix config tests#2388
nvuillam merged 15 commits into
oxsecurity:mainfrom
bdovaz:feature/fix-tests

Conversation

@bdovaz

@bdovaz bdovaz commented Feb 23, 2023

Copy link
Copy Markdown
Collaborator

Attemp to fix them with the help of @Kurt-von-Laven in #2381 (comment)

@bdovaz
bdovaz requested a review from nvuillam as a code owner February 23, 2023 21:14
@bdovaz

bdovaz commented Feb 24, 2023

Copy link
Copy Markdown
Collaborator Author

@Kurt-von-Laven can you help me to fix it? It's quite hopeless to have to wait more than half an hour for the 5 tests I want to fix config to run.

I'm using certain github variables to resolve the repository name and branch correctly.

I'm not sure if I'm doing it right and since I can't debug the values I get as I'm a bit blind.

@nvuillam

Copy link
Copy Markdown
Member

@bdovaz you can set the following in the commit message when you just update python code and want to reduce the tested methodes

quick build
TEST_KEYWORDS=config_test

TEST_KEYWORDS=config_test
@bdovaz

bdovaz commented Feb 24, 2023

Copy link
Copy Markdown
Collaborator Author

@nvuillam it did not work for me on: 0c2014f

@nvuillam

Copy link
Copy Markdown
Member

In a bar, can't act now :/
But i'd like to release a new version this weekend, i'll try to help :)

@bdovaz

bdovaz commented Feb 24, 2023

Copy link
Copy Markdown
Collaborator Author

@nvuillam @Kurt-von-Laven I give up, I can't find the right combination to correctly resolve the variables for the owner and repository name when coming from a fork.

If you help me I would appreciate it

Also, this quick build does not work with a test commit I have done and it is even more frustrating to have to wait more than half an hour between tests.

@nvuillam

Copy link
Copy Markdown
Member

Rollback ? ^^

bdovaz and others added 6 commits February 25, 2023 10:44
TEST_KEYWORDS=config_test
TEST_KEYWORDS=config_test
TEST_KEYWORDS=config_test
TEST_KEYWORDS=config_test
TEST_KEYWORDS=config_test
@bdovaz

bdovaz commented Feb 25, 2023

Copy link
Copy Markdown
Collaborator Author

@nvuillam @Kurt-von-Laven looks like the key was:

https://docs.github.com/en/actions/learn-github-actions/contexts

image

Looking at the contents of github I could see how to get the repository and branch correctly when it is a pull request or when it is not.

In this build I have passed the tests only as I had not done rebase I got an error fixed in main:

https://github.com/oxsecurity/megalinter/actions/runs/4269559713/jobs/7432816126

I have launched a new build and I hope it is the final one and I can unlock @echoix.

@bdovaz

bdovaz commented Feb 25, 2023

Copy link
Copy Markdown
Collaborator Author

@nvuillam can you solve the checkov problems please? I'm not at home 馃槄

@nvuillam nvuillam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great :)

@nvuillam
nvuillam merged commit 497b09a into oxsecurity:main Feb 26, 2023
@Kurt-von-Laven

Copy link
Copy Markdown
Collaborator

Looking at the contents of github I could see how to get the repository and branch correctly when it is a pull request or when it is not.

Yeah, you can get the repository and branch out of the github context, but the environment variables I mentioned previously should work equally well, and I found them a little easier to work with.

@bdovaz
bdovaz deleted the feature/fix-tests branch February 26, 2023 08:19
@bdovaz

bdovaz commented Feb 26, 2023

Copy link
Copy Markdown
Collaborator Author

@nvuillam but at the end you have merged it without solving checkov errors. I say this because anyone who wants to merge is going to encounter the same problem.

@nvuillam

Copy link
Copy Markdown
Member

@bdovaz i did it in another PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants