Merge pull request #18 from satisfactorymodding/ci-fixes

chore: consistent CI behaviour
This commit is contained in:
Vilsol 2023-06-12 14:08:48 +03:00 committed by GitHub
commit 23f9884874
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -47,6 +47,7 @@ jobs:
- name: golangci-lint - name: golangci-lint
uses: golangci/golangci-lint-action@v2 uses: golangci/golangci-lint-action@v2
with: with:
version: v1.51
skip-pkg-cache: true skip-pkg-cache: true
skip-build-cache: true skip-build-cache: true

View file

@ -141,6 +141,10 @@ func (r *resolvingInstance) Step() error {
return errors.Wrap(err, "failed resolving mod dependencies") return errors.Wrap(err, "failed resolving mod dependencies")
} }
sort.Slice(dependencies.Mods, func(i, j int) bool {
return dependencies.Mods[i].Mod_reference < dependencies.Mods[j].Mod_reference
})
for _, mod := range dependencies.Mods { for _, mod := range dependencies.Mods {
modVersions := make([]ModVersion, len(mod.Versions)) modVersions := make([]ModVersion, len(mod.Versions))
for i, version := range mod.Versions { for i, version := range mod.Versions {

View file

@ -41,7 +41,7 @@ func TestProfileResolution(t *testing.T) {
}, },
}).Resolve(resolver, nil, math.MaxInt) }).Resolve(resolver, nil, math.MaxInt)
testza.AssertEqual(t, "failed resolving profile dependencies: mod RefinedRDLib version 1.0.6 does not match constraint ^1.0.7", err.Error()) testza.AssertEqual(t, "failed resolving profile dependencies: failed resolving dependencies. requires different versions of RefinedRDLib", err.Error())
_, err = (&Profile{ _, err = (&Profile{
Name: DefaultProfileName, Name: DefaultProfileName,