-
Notifications
You must be signed in to change notification settings - Fork 69
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
Use Mage as build tool #111
Conversation
As generated by `mage -init`
For tracking its own dependencies instead of polluting the root's go.mod which is not meant to have any dependencies.
Some reusing existing scripts
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
==========================================
- Coverage 77.14% 67.71% -9.43%
==========================================
Files 22 24 +2
Lines 1750 2057 +307
==========================================
+ Hits 1350 1393 +43
- Misses 270 534 +264
Partials 130 130
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The builds and tests are 🟢 . |
With this PR we migrate from the Bash and PowerShell scripts for building/testing to Mage. This way it doesn't matter anymore on which platform you work with
gokv
- instead of running either the PowerShell or the Bash script,mage <target>
should always work.Some build targets still make use of pre-existing scripts, but others are replaced:
mage update
runs the existingbuild/update-deps.ps1
/.sh
scripts for updating the dependencies of all modulesmage build
builds all modules via existingbuild/build.ps1
/.sh
scriptsmage test ...
is a full reimplementation ofbuild/test.sh
in Go / in the magefile. There was no PowerShell script for running the tests on Windows, so this is a big win.mage test all
keeps the old behavior of testing all modulesmage test redis
(or similar) tests just the given module, which was not implemented in the Bash scriptmage clean
deletes any code coverage output filesSome scripts were simply removed and we don't need Mage targets for them:
combine-coverage.sh
isn't necessary anymore. It seems that whencoverage.txt
files are present in various directories, Codecov can now handle all of them, without us having to combine them into a single file firsttidy.ps1
is not used anymore. Theupdate-deps
scripts already include a tidy step.