Esteban,
#record _is_ run against the baseline that is in the image if it is
present. This is true for all of the Metacello commands - if the
BaselineOf is present it is used, if it is not present it will be
loaded. The #get command will load a fresh copy of the baseline from the
repository.
There is an option to ignore image state (#ignoreImage) when running
#record (or any other command) to simulate loading into an "empty" image
... depending upon the volume of output, you could read the report to
determine if the packages/projects that you are expecting to see are
being loaded and of course if your goal is to expose outright errors
#record should do that as well ...
Dale
On 8/28/20 10:59 AM, Esteban Maringolo wrote:
Hi Jonathan,
I never thought of SmalltalkCI for that (I use Gitlab) but in essence
it still requires a trial and error approach (of committing the
Baseline and loading it afterwards to see if it works).
Metacello has a "record" operation that basically does a dry run of
the load, but I don't know if there is a way to do it using the
Baseline in the image instead of one in a repository.
Regards!
Esteban A. Maringolo
On Fri, Aug 28, 2020 at 10:10 AM Jonathan van Alteren
<jvalte...@objectguild.com> wrote:
Hi Esteban,
You might want to give smalltalkCI a try: https://github.com/hpi-swa/smalltalkCI
I've recently started using it myself, with GitLab CI and GitHub Actions, but
one of the cool things is that you can use it to test your build locally.
For example, create a .smalltalk.ston file for your project which loads the
baseline that you want to test, like this:
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'MyProject',
#directory : 'source',
#load : [ 'default' ],
#onWarningLog : true,
#platforms : [ #pharo ]
}
],
#testing : {
#categories : [ 'MyProject-Tests' ]
}
}
Then clone the smalltalkCI repo locally and open a terminal on its location,
for example /Users/johndoe/git/smalltalkCI. You can then simply use smalltalkCI
to build a Pharo image of your baseline, which effectively tests the correct
working of your baseline:
bin/smalltalkci -s "Pharo64-8.0" /Users/johndoe/git/MyProject/.smalltalk.ston
By default, it will run all tests in the image, but you can change the list of
tests being run by modifying the .smalltalk.ston file accordingly (see
https://github.com/hpi-swa/smalltalkCI#testcase-selection).
Hope this helps!
Kind regards,
Jonathan van Alteren
Founding Member | Object Guild B.V.
Sustainable Software for Purpose-Driven Organizations
jvalte...@objectguild.com
On 27 Aug 2020, 04:12 +0200, Esteban Maringolo <emaring...@gmail.com>, wrote:
Hi,
How can I check that my baseline works without having to publish
everything, check that it fails and then going to the origin, fixing,
etc?
I might be particularly idiot to always miss something, I usually have
to try at least four times (in a blank image) that my Baseline,
dependencies, etc. works as expected.
There must be some other way.
Esteban A. Maringolo