-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Introducing github action for build automatisation (using python) #268
Conversation
I will take a closer look in the upcomming days! :) Been a bit busy now but it's on my todo list! :) |
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.
First of all and I can't say this to often: A very big thank you, i really appreciate your contribution in ideas and code. Sorry for the delay, but since I do this project in my free time and i'm currently pretty busy it took me some time to review and test it. Since this addition improves the quality of this project a lot I wanted to take a deep look into your contribution. Sidenote: Good comments in the python scripts! Helps a lot to figure out what happens! 👍🏻 I tested the github action by forking the project to my own.
Here are my suggestions/comments:
- Can the
.pyc
(py-cache) scripts be removed? I don't think they are required in the repo, or are they? (f.e..github/scripts/build_assets/__pycache__/PathResolverAction.cpython-38.pyc
). We should also add them to.gitignore
, since they were added and commited by gitgit add .
command running in the action. .github/scripts/build_assets/geckodriver.exe
should be documented (version, source,..) maybe add a readme?- As we figured out in our discussion it would be good to run our gulp task
gulp default
(for combining the colors/alias and creating a minified version) after finishing the iconmoon job. Maybe you could introduce this? - Is there a reason to include the icon changes to
haskell
in this branch? I would suggest separate this to keep things clean. - In your code-comments you often write
icomoon_test.json
anddevicon_test.json
is this intented?
Happy to hear your feedback on my review! :)
Hey @amacado, I really appreciate your feedback :) I understand the delay and I am not bothered by it. In fact, I think I might be in the same boat as you in the next few months. I also would like to thank you for going over my codes and discussing things with me. It really helps having a second person do a code review on something like this. So as always, I'll address your points one by one: Can the .pyc (py-cache) scripts be removed? I don't think they are required in the repo, or are they? (f.e. .github/scripts/build_assets/pycache/PathResolverAction.cpython-38.pyc). We should also add them to .gitignore, since they were added and commited by git git add . command running in the action. The cache is not essential so I can definitely do that. The IDE that I use would hide this folder while I work so I sometimes forget that it exists. .github/scripts/build_assets/geckodriver.exe should be documented (version, source,..) maybe add a readme? That sounds good to me. I'll add a README about it. As we figured out in our discussion it would be good to run our gulp task gulp default (for combining the colors/alias and creating a minified version) after finishing the iconmoon job. Maybe you could introduce this? This is on my TODO list. I'm currently working on adding the Is there a reason to include the icon changes to haskell in this branch? I would suggest separate this to keep things clean. Are you referring to the fact that the In your code-comments you often write icomoon_test.json and devicon_test.json is this intented? That was not intended. During testing, I would rename the original files to I hope that answered all your questions. I'll start working on your suggestions and I'll let you know when I'm done. |
Co-authored-by: Clemens Bastian <[email protected]>
ah! Now I understand. But again, I would suggest to track this issue 274 in a separated pull request, I will open one to keep our directory structure clean and not mixin this with our build script.
looking forward to review your changes! :) happy coding! |
Merge build-integrate with updated master
… auto-commit-action in workflow
f839169
to
72a6dbf
Compare
0a9f1a4
to
5aa1708
Compare
remove built_files dir
Build integrate
…grate # Conflicts: # fonts/devicon.eot # fonts/devicon.ttf # fonts/devicon.woff
remove branch from action
add name for geckodriver log build artifact
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.
@Thomas-Boi well done! I did some intense reviewing and here are the results. I addressed most of them myself in #281 which can be merged into this build-integrate
branch.
Those two icons contain a typo "workmark" instead "wordmark" (which a already resolved in the current master branch 493ebf3). I will create a pull request to remove them in this branch as well. Probably a merging error?
icons/haskell/haskell-original-workmark.svg
icons/haskell/haskell-plain-workmark.svg
Tried to address a bug where the icomoon_upload.py failed during build for the first time but run perfectly for the next times.
While testing I encountered the same bug. The first time the action runs it will throw the following action. The second re-run has thrown the same error. In the third try it worked as expected. I did not investigate further but throughout my testing this behaviour encountered multiple times.
Run python ./.github/scripts/icomoon_upload.py ./.github/scripts/build_assets/geckodriver-v0.27.0-win64/geckodriver.exe ./icomoon.json ./devicon.json ./icons ./ --headless
Message: No connection could be made because the target machine actively refused it. (os error 10061)
None
Traceback (most recent call last):
File "./.github/scripts/icomoon_upload.py", line 47, in main
runner = SeleniumRunner(args.icomoon_json_path, args.download_path,
File "D:\a\devicon\devicon\.github\scripts\build_assets\SeleniumRunner.py", line 52, in __init__
self.set_options(geckodriver_path, headless)
File "D:\a\devicon\devicon\.github\scripts\build_assets\SeleniumRunner.py", line 75, in set_options
self.driver = WebDriver(options=options, executable_path=geckodriver_path)
File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__
RemoteWebDriver.__init__(
File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: No connection could be made because the target machine actively refused it. (os error 10061)
Added a upload-artifact action to upload the geckodriver.log for debugging purpose
I like that! 👍🏻 I propose to setup a name for the artifact, will add this in my pull request.
Change the extract_path to the root directory. From now on, the script will replace the icomoon.json and the font folder after successful runs.
So far so good, I will remove the built_files
since it's no longer used then.
The commit action required a branch input to function properly for PR trigger => Added that in the workflow yml.
As in the documentation pointed out when no branch is given as parameter it will use the current branch as target (which is what we want). When you hard-code build-integrate
at this place the action failes after the pull request is merged into another branch (f.e. master).
Enhancing build scripts (bugfixing, documentation, introducing gulp, cleanup)
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.
In my opinion after #281 is beeing merged this pull request is fine for the first working version of our build automatisation. If @Thomas-Boi approves this can be merged into master. The next (independent) step would be the transformation of devicon.json to the new format including color and alias where we can replace the current gulp default
task (@Thomas-Boi started working on it in #279).
interface NewDeviconObject extends DeviconObject {
"color": string; // color for the colored version
"alias": [
{
"base": string;
"alias": string;
},
{
"base": string;
"alias": string;
}
]
}
I am fine with the changes that you introduced. However, there's one small change: the
|
Hello all,
I have finished the build script for devicon.
Here are the features that this branch has:
Currently, the new files are put into a folder called
built_files
. This is done so that reviewers can test the process without loosing the original copies. Before we merge, we'd need to change it so that the script will replace the old files with the new ones.All feedback and discussions are appreciated.