Comments (6)
@pajhiwo I would like to propose following change to Actions.
Current solution
- we have 2 workflows: Pre Submit verification (run on commit to every branch except master) and Submit Verification (that should be run only on merge to master)
- Both workflows are implemented using yml files
- Workflows are almost identical. SV differs from PSV only by 2 steps: creating whl and archiving it. Remaining 70% of those files are the same
- Currently github does not have easy way to factor out common part into some import (at least I didn't found it)
Proposed solution
- single workflow that will run for commits on master and any other branch
- Single implementation file
- Additional parts in SV (whl and archiving) implemented using conditional steps that will run only on master:
...
- name: Build wheel
if: github.ref == 'refs/heads/master'
...
Pros:
- easier to maitain
- no duplication of the code
- single place to check the results
Cons:
- We might introduce another conditional steps that add some additional complication to yml file
- Action looks in following way: https://github.com/czerus/pydriver/runs/1928082715?check_suite_focus=true All the steps are there. Those not executed (due to condition) have different icons
EDIT
There is new feature of actions called composite actions and it looks like it allows to reuse steps but firstly I would need to take a look on this deeper: https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action
EDIT2: I believe composite actions mentioned above could be the way to go ("this is the way") if they support uses
, but currently they do not. We are using following uses
actions: To checkout the code(actions/checkout@v2
) and to setup the cache (actions/cache@v2
). Here is great explanation how to use it: https://dev.to/n3wt0n/github-composite-actions-nest-actions-within-actions-3e5l
@pajhiwo please share your thoughts.
from pydriverr.
This looks interesting and yes, this approach will decrease duplication of code, especially at this stage when there is such small difference between two workflows.
I do not have much DevOps exp. but i'm fan of separation. I think (my personal point of view) would be to have them separate - just in case we need to have them different in future.
But.....that composition seems like perfect solution, as we could create "common" steps and then just reuse them between SV and PSV workflows - so kind of achieving compromise in both:
- not having duplication of code
- have both workflows separate.
EDIT: actually i would change different thing. I have noticed that PSV is run on every commit, even when I do not intend to create PR, and i push just to store it on origin branch - and it uses those free runs. Maybe it would be possible not to run it on every save-commit, and only when creating PR - PSV i mean.
from pydriverr.
I didn't explain it properly. I also opt for separation but current actions implementations (by Github) allows only to move common part to some sharable part if it doesn't use uses
in step. We have only following steps that does not use it: Linting, Test, Install dependencies, Setup python version. Also whole structure of psv or sv needs to be repeated in both workflows. I do not know if the gain is really big enough to justify keeping 2 workflows instead of 1 with conditions.
Regarding the free minutes. This project has 2000 free minutes per month. I believe currently we are not using even 20 minutes per month (thanks to cache mechanism). Also it is sometimes beneficial run the CI before raising PR to be sure everything is fine and sometimes it takes several iteration to make something properly.
from pydriverr.
ah. if that is the case, then cool. lets have one workflow file
from pydriverr.
as we have to improve the workflow and implement testing on windows I will handle here only original issue
from pydriverr.
@pajhiwo but maybe we could implement such explicit handling of skipping the CI run: https://stackoverflow.com/questions/59759921/how-to-skip-github-actions-job-on-push-event/59775665#59775665
EDIT: this is already implemented by default: https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
from pydriverr.
Related Issues (20)
- implement handling opera HOT 1
- Refactor tests HOT 3
- Add missing docstring in tests
- Fix tests so they run on clean env
- Implement handling phantomJS
- Implement handling Internet Explorer
- Fix double prints when more than 1 drivers is updated
- Design and implement release management process HOT 1
- refactor common code in drivers
- Wrong file installed (sha512_sum) for operadirver HOT 1
- Introduce API for running commands in python scripts
- Fix unit tests for opera
- Add windows build environment
- Do not check underlying system info when WebDriver class is init
- Create release 1.0.0-rc1
- Add option to install version of driver matching installed web browser
- Rename Project to pydriverr
- Add ability to install driver in version matching installed web browser
- As a User I want to be able to enter the product URL into a GUI
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydriverr.