Skip to content

Commit

Permalink
Merge pull request #1765 from pharo-vcs/fix-CI
Browse files Browse the repository at this point in the history
Fix CI and remove Ring2 dependency
  • Loading branch information
MarcusDenker authored Nov 21, 2023
2 parents 622e4bb + fc689b9 commit 20f93ae
Show file tree
Hide file tree
Showing 24 changed files with 113 additions and 266 deletions.
3 changes: 0 additions & 3 deletions .github/scripts/preLoading.st

This file was deleted.

3 changes: 0 additions & 3 deletions .github/scripts/preTesting.st

This file was deleted.

9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup smalltalkCI
uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
# - name: Load Image and Run Release Tests
# run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.release.ston
# timeout-minutes: 10
# - name: Clean Up
# run: rm -Rf ${{ env.SMALLTALK_CI_BUILD }}
smalltalk-version: ${{ matrix.smalltalk }}
- name: Load Image and Run Tests
run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }}
shell: bash
Expand Down
3 changes: 1 addition & 2 deletions .project
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
'srcDirectory' : '',
'tags' : [ #system ]
'srcDirectory' : ''
}
18 changes: 0 additions & 18 deletions .smalltalk.release.ston

This file was deleted.

10 changes: 1 addition & 9 deletions BaselineOfIceberg/BaselineOfIceberg.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ BaselineOfIceberg >> baseline: spec [

self tonel: spec.
self libgit: spec.
self ring2: spec.

spec
"iceberg"
Expand All @@ -31,7 +30,7 @@ BaselineOfIceberg >> baseline: spec [
package: 'Iceberg-TipUI' with: [ spec requires: #('Iceberg') ];
package: 'Iceberg-Memory' with: [ spec requires: #('Iceberg') ];
"tests"
package: 'Iceberg-Tests' with: [ spec requires: #('Iceberg' 'Iceberg-Memory' 'Ring2') ];
package: 'Iceberg-Tests' with: [ spec requires: #('Iceberg' 'Iceberg-Memory') ];
package: 'Iceberg-Tests-MetacelloIntegration' with: [ spec requires: #('Iceberg-Tests') ];
package: 'Iceberg-UI-Tests' with: [ spec requires: #('Iceberg-TipUI' 'Iceberg-Tests')];
package: 'Iceberg-Plugin-Migration-Tests' with: [ spec requires: #('Iceberg-Plugin-Migration' 'Iceberg-Tests') ];
Expand Down Expand Up @@ -125,13 +124,6 @@ BaselineOfIceberg >> resetKMRepository [
ifPresent: [ :class | class reset ]
]

{ #category : 'baseline' }
BaselineOfIceberg >> ring2: spec [
spec
baseline: 'Ring2'
with: [ spec repository: 'github://guillep/Ring2:v2.0.0/src' ]
]

{ #category : 'baseline' }
BaselineOfIceberg >> tonel: spec [
spec
Expand Down
7 changes: 5 additions & 2 deletions Iceberg-Memory/IceMemoryCommit.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ Class {
{ #category : 'comparing' }
IceMemoryCommit >> = aCommit [

^ (self mcCommit dependencies asArray sort: [ :a :b | a timeStamp > b timeStamp ])
= (aCommit mcCommit dependencies asArray sort: [ :a :b | a timeStamp > b timeStamp ])
self == aCommit ifTrue: [ ^ true ].

self species = aCommit species ifFalse: [ ^ false ].

^ self mcCommit dependencies asSet = aCommit mcCommit dependencies asSet
]

{ #category : 'accessing' }
Expand Down
5 changes: 1 addition & 4 deletions Iceberg-Memory/IceMemoryRepository.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ IceMemoryRepository class >> exampleWithChanges [
anotherPackageName := 'AnotherNonExistentPackage' asSymbol.
repository := self exampleWithNoChanges.
repository workingCopy addPackageNamed: anotherPackageName.
Object subclass: 'IceGeneratedClassForUI'
instanceVariableNames: ''
classVariableNames: ''
package: anotherPackageName.
(Object << 'IceGeneratedClassForUI' package: anotherPackageName) install.
self assert: repository isModified.
^ repository
]
Expand Down
7 changes: 4 additions & 3 deletions Iceberg-Memory/IceRingWorkingCopy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ Class {

{ #category : 'helpers' }
IceRingWorkingCopy >> addClassVariable: aVariableName to: aClassName [

| class |
class := ringEnvironment ensureClassNamed: aClassName.
class addClassVariable: (RG2ClassVariableDefinition named: aVariableName asSymbol parent: class ).
class addClassVariable: (RGClassVariable named: aVariableName asSymbol parent: class)
]

{ #category : 'private-impacting-changes' }
Expand Down Expand Up @@ -139,7 +140,7 @@ IceRingWorkingCopy >> environment [
IceRingWorkingCopy >> initialize [

super initialize.
ringEnvironment := RG2Environment new.
ringEnvironment := RGEnvironment new.
]

{ #category : 'packages' }
Expand Down Expand Up @@ -169,7 +170,7 @@ IceRingWorkingCopy >> loadPackagesNamed: packageNames fromCommit: aCommit [
fromCommit: aCommit
package: package)
mcSnapshot.
snapshot ring2ImportInto: ringEnvironment asPackageNamed: packageName.
snapshot importInto: ringEnvironment asPackageNamed: packageName.
package beClean.
].
self referenceCommit: aCommit
Expand Down
4 changes: 2 additions & 2 deletions Iceberg-Memory/IceRingWorkingCopyChangerVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ IceRingWorkingCopyChangerVisitor >> visitTraitDefinition: anIceTraitDefinition [
inPackage: package name
with: [ :trait |
| composition transformations |
composition := RG2TraitCompositionDefinition parent: trait.
transformations := RG2TraitCompositionVisitor new
composition := RGTraitComposition parent: trait.
transformations := RGTraitCompositionVisitor new
parse: anIceTraitDefinition asMCDefinition traitComposition
for: composition.
trait traitComposition: composition.
Expand Down
17 changes: 17 additions & 0 deletions Iceberg-Memory/ManifestIcebergMemory.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"
Please describe the package using the class comment of the included manifest class. The manifest class also includes other additional metadata for the package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser
"
Class {
#name : 'ManifestIcebergMemory',
#superclass : 'PackageManifest',
#category : 'Iceberg-Memory-Manifest',
#package : 'Iceberg-Memory',
#tag : 'Manifest'
}

{ #category : 'meta-data - dependency analyser' }
ManifestIcebergMemory class >> manuallyResolvedDependencies [

<ignoreForCoverage>
^ #(#'Collections-Streams' #'Monticello-Model' #'FileSystem-Core' #'Collections-Abstract' #'Ring-Monticello')
]
2 changes: 1 addition & 1 deletion Iceberg-Tests/IceAbstractTestCase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ IceAbstractTestCase >> setUp [
{ #category : 'running' }
IceAbstractTestCase >> tearDown [

fixture tearDown.
fixture ifNotNil: [ fixture tearDown ].
super tearDown.
]

Expand Down
8 changes: 4 additions & 4 deletions Iceberg-Tests/IceClassesCherryPickingTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ IceClassesCherryPickingTest >> testAddClassDependingInATrait [
inPackage: self packageName1 asSymbol
with: [ :class |
| composition transformations |
composition := RG2TraitCompositionDefinition parent: class.
transformations := RG2TraitCompositionVisitor new
composition := RGTraitComposition parent: class.
transformations := RGTraitCompositionVisitor new
parse: 'TestTrait'
for: composition.
class traitComposition: composition.
Expand Down Expand Up @@ -71,8 +71,8 @@ IceClassesCherryPickingTest >> testAddClassDependingInATraitWithComposition [
inPackage: self packageName1 asSymbol
with: [ :class |
| composition transformations |
composition := RG2TraitCompositionDefinition parent: class.
transformations := RG2TraitCompositionVisitor new
composition := RGTraitComposition parent: class.
transformations := RGTraitCompositionVisitor new
parse: 'TestTrait - {#hello. #world}'
for: composition.

Expand Down
98 changes: 23 additions & 75 deletions Iceberg-Tests/IceMethodCherryPickingTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -427,36 +427,27 @@ IceMethodCherryPickingTest >> testAddMethodWithClassAndSuperclassAsDependency [

{ #category : 'tests' }
IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependency [

| commitToCherryPick diff mergeTree |
self repository createBranch: 'b2'.

self repository workingCopy addPackageNamed: self packageName1.
self repository workingCopy
createClass: 'TestClass2'
inPackage: self packageName1 asSymbol
with: [ :class |
class
addClassVariable:
(RG2ClassVariableDefinition
named: 'TestClassVariable' asSymbol
parent: class) ].
self repository
commitWithMessage: 'Adding a test class with class variable'.
with: [ :class | class addClassVariable: (RGClassVariable named: 'TestClassVariable' asSymbol parent: class) ].
self repository commitWithMessage: 'Adding a test class with class variable'.

self repository workingCopy addPackageNamed: self packageName1.
self repository workingCopy
createClass: 'TestClass3'
inPackage: self packageName1 asSymbol
with:
[ :class | class superclass: (class environment ask behaviorNamed: #TestClass2) ].
with: [ :class | class superclass: (class environment ask behaviorNamed: #TestClass2) ].
self repository commitWithMessage: 'Adding another test class'.

self repository workingCopy addPackageNamed: self packageName1.
self repository workingCopy
createMethod: 'm1 ^TestClassVariable'
inClass: 'TestClass3' asSymbol.
self repository
commitWithMessage: 'Adding method using test class variable'.
self repository workingCopy createMethod: 'm1 ^TestClassVariable' inClass: 'TestClass3' asSymbol.
self repository commitWithMessage: 'Adding method using test class variable'.

commitToCherryPick := fixture repository head.

Expand All @@ -465,68 +456,40 @@ IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependency [
diff := mergeTree collect: [ :each | each chosenOperation ].

self assert: diff children size equals: 1.
self
assert: (diff / self packageName1) children size
equals: 4.
self assert: (diff / self packageName1) children size equals: 4.

self
assert:
(diff / self packageName1 / 'TestClass2') value
isAddition.
self
assert:
(diff / self packageName1 / 'TestClass2')
children size
equals: 0.
self assert: (diff / self packageName1 / 'TestClass2') value isAddition.
self assert: (diff / self packageName1 / 'TestClass2') children size equals: 0.

self
assert:
(diff / self packageName1 / 'TestClass3') value
isAddition.
self
assert:
(diff / self packageName1 / 'TestClass3')
children size
equals: 1.
self assert: (diff / self packageName1 / 'TestClass3') value isAddition.
self assert: (diff / self packageName1 / 'TestClass3') children size equals: 1.

self
assert:
(diff / self packageName1 / 'TestClass3' / 'm1')
value isAddition
self assert: (diff / self packageName1 / 'TestClass3' / 'm1') value isAddition
]

{ #category : 'tests' }
IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependencyWithSuperclassAlreadyCommited [

| commitToCherryPick diff mergeTree |
self repository createBranch: 'b2'.

self repository workingCopy addPackageNamed: self packageName1.
self repository workingCopy
createClass: 'TestClass'
inPackage: self packageName1 asSymbol
with: [ :class |
class
addClassVariable:
(RG2ClassVariableDefinition
named: 'TestClassVariable' asSymbol
parent: class) ].
self repository
commitWithMessage: 'Adding a test class with class variable'.
with: [ :class | class addClassVariable: (RGClassVariable named: 'TestClassVariable' asSymbol parent: class) ].
self repository commitWithMessage: 'Adding a test class with class variable'.

self repository workingCopy addPackageNamed: self packageName1.
self repository workingCopy
createClass: 'TestClass2'
inPackage: self packageName1 asSymbol
with:
[ :class | class superclass: (class environment ask behaviorNamed: #TestClass) ].
with: [ :class | class superclass: (class environment ask behaviorNamed: #TestClass) ].
self repository commitWithMessage: 'Adding another test class'.

self repository workingCopy addPackageNamed: self packageName1.
self repository workingCopy
createMethod: 'm1 ^TestClassVariable'
inClass: 'TestClass2' asSymbol.
self repository
commitWithMessage: 'Adding method using test class variable'.
self repository workingCopy createMethod: 'm1 ^TestClassVariable' inClass: 'TestClass2' asSymbol.
self repository commitWithMessage: 'Adding method using test class variable'.

commitToCherryPick := fixture repository head.

Expand All @@ -535,28 +498,13 @@ IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependencyWithSupe
diff := mergeTree collect: [ :each | each chosenOperation ].

self assert: diff children size equals: 1.
self
assert: (diff / self packageName1) children size
equals: 3.
self assert: (diff / self packageName1) children size equals: 3.

self
assert:
(diff / self packageName1 / 'TestClass') value
isModification.
self assert: (diff / self packageName1 / 'TestClass') value isModification.

self
assert:
(diff / self packageName1 / 'TestClass2') value
isAddition.
self
assert:
(diff / self packageName1 / 'TestClass2')
children size
equals: 1.
self
assert:
(diff / self packageName1 / 'TestClass2' / 'm1')
value isAddition
self assert: (diff / self packageName1 / 'TestClass2') value isAddition.
self assert: (diff / self packageName1 / 'TestClass2') children size equals: 1.
self assert: (diff / self packageName1 / 'TestClass2' / 'm1') value isAddition
]

{ #category : 'tests' }
Expand Down
6 changes: 2 additions & 4 deletions Iceberg-Tests/IceParameterizedTestCase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,10 @@ IceParameterizedTestCase >> printOn: aStream [
IceParameterizedTestCase >> setUp [

super setUp.
oldShareRepositoriesBetweenImages := IceLibgitRepository
shareRepositoriesBetweenImages.
oldShareRepositoriesBetweenImages := IceLibgitRepository shareRepositoriesBetweenImages.
IceLibgitRepository shareRepositoriesBetweenImages: false.
provider := IceCredentialsProvider providerType.
IceCredentialsProvider providerType:
IceNonInteractiveCredentialsProvider.
IceCredentialsProvider providerType: IceNonInteractiveCredentialsProvider.
self parameters do: [ :each | each activate ]
]

Expand Down
4 changes: 2 additions & 2 deletions Iceberg-Tests/IceRepositoryWithSingleRemoteTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ IceRepositoryWithSingleRemoteTest >> testFetchUpdatesTrackedRemoteBranch [
| newCommit remoteTrackedBranches |
self remoteRepository workingCopy addPackageNamed: 'AnotherPackage'.
newCommit := self remoteRepository commitWithMessage: 'Another commit message'.

self repository fetch.
remoteTrackedBranches := self repository remoteTrackedBranches.
self assert: remoteTrackedBranches size equals: 1.
self assert: self repository remoteTrackedBranches anyOne commit equals: newCommit
self assert: remoteTrackedBranches anyOne commit equals: newCommit
]

{ #category : 'tests-checkout' }
Expand Down
Loading

0 comments on commit 20f93ae

Please sign in to comment.