0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-18 20:10:04 +02:00

fix: Adjust the integrationtests

This commit is contained in:
ZPascal 2026-05-27 18:30:30 +02:00
parent 7e6b32f587
commit 0db98b5727

View File

@ -10,6 +10,7 @@ import (
actions_model "gitea.dev/models/actions"
"gitea.dev/models/db"
"gitea.dev/modules/actions/jobparser"
"gitea.dev/modules/log"
"gitea.dev/modules/util"
act_model "gitea.com/gitea/runner/act/model"
@ -128,6 +129,12 @@ func InsertRun(ctx context.Context, run *actions_model.ActionRun, content []byte
runJobs := make([]*actions_model.ActionRunJob, 0, len(jobs))
var hasWaitingJobs bool
rawStrategies, err := ExtractRawStrategies(content)
if err != nil {
log.Warn("Failed to extract raw strategies for run %d: %v", run.ID, err)
rawStrategies = nil
}
for i, v := range jobs {
id, job := v.Job()
needs := job.Needs()
@ -160,6 +167,13 @@ func InsertRun(ctx context.Context, run *actions_model.ActionRun, content []byte
runJob.TokenPermissions = perms
}
// Store the raw strategy for jobs whose matrix references needs outputs.
// ReEvaluateMatrixForJobWithNeeds uses this to re-expand the matrix once
// the dependency jobs have completed and their outputs are available.
if rawStrategy, ok := rawStrategies[id]; ok && HasMatrixWithNeeds(rawStrategy) {
runJob.RawStrategy = rawStrategy
}
// check job concurrency
if job.RawConcurrency != nil {
rawConcurrency, err := yaml.Marshal(job.RawConcurrency)