-
Notifications
You must be signed in to change notification settings - Fork 44
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
#308 put CaM sources into zip archive #366
Conversation
@Raleksan what about a unit test for this new feature? Simply put, how do you know that it works? |
I think adding a test for this feature is achievable for me. As I understand, the tests for the scripts in the Am I getting this right? p.s. Do I always need to ping you with @*? Or will you get the notification anyway? |
@Raleksan you are right, the tests are in the |
@yegor256 I added a new test, you can review it. |
cam_repo_target_dir="${TARGET}/github/self/${name}" | ||
|
||
if [ ! -d "${cam_repo_target_dir}" ]; then | ||
git clone --depth 1 https://github.com/yegor256/cam.git "${cam_repo_target_dir}" |
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.
@Raleksan I believe, it is reasonable to delete the "${cam_repo_target_dir}/.git"
directory after the clone
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.
@yegor256 I know that I need to delete .git
, therefore I locate it at ${TARGET}/github/self/${name}
to delete .git
directory with all others git directories, using already existing command, or it is better to do it separately and explicitly?
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.
@Raleksan this location is wrong, I believe. Let's put it into ${TARGET}/cam-sources
instead
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.
@yegor256 I changed the location as you remarked and improved the test.
Can you please review it again?
@Raleksan not all tests pass after your changes. Try to run |
I have analyzed the pipeline run errors and found that both failures depend on the same test I checked out The actions of
I'm interested in line 49:
It's unclear to me from where we inherit this ‘magic number’. For this PR, I added 1 entity to p.s. These are just my thoughts without running tests because I faced a bug while building a Docker container locally, I'm going to investigate and try to fix this problem or open an issue if if it's a real bug |
@Raleksan here, 10 is the number of highest-level elements we expect to have in the array. It's indeed a magic number. I believe, you should just change it to 11 and the test will pass. |
@yegor256 I corrected this value, can you run CI to test it? I'm still having problems with the local build of the Docker image. |
@Raleksan if you have problem with Docker, please report an issue, we will try to resolve it |
@Raleksan thanks! |
Work under #308: Adding CaM sources to a zip archive.
Some notes:
${TARGET}/github/self/${name}
to use a common command for all repos, removing the.git
directories.