mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
chore(ci): autoremove when running a workflow in a test (#780)
Otherwise resources linger when tests are checking for conditions that require a workflow to fail. ```sh earl-warren:~/software/runner$ go test -count=1 -run='TestJobExecutorWorkflows/uses-github-short-sha' ./act/runner ok code.forgejo.org/forgejo/runner/v9/act/runner 0.276s earl-warren:~/software/runner$ docker network ls | grep WORKFLOW 2e57caeb514d WORKFLOW-cc93880718786fef12c18e53feecee5c8ef1cc155840bf4c0275a2fca61b99b9_JOB-test-test-network bridge local earl-warren:~/software/runner$ ``` <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - other - [PR](https://code.forgejo.org/forgejo/runner/pulls/780): <!--number 780 --><!--line 0 --><!--description Y2hvcmUoY2kpOiBhdXRvcmVtb3ZlIHdoZW4gcnVubmluZyBhIHdvcmtmbG93IGluIGEgdGVzdA==-->chore(ci): autoremove when running a workflow in a test<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/780 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
51fb504a2e
commit
a01cb5e6c5
1 changed files with 1 additions and 0 deletions
|
@ -190,6 +190,7 @@ func (j *TestJobFileInfo) runTest(ctx context.Context, t *testing.T, cfg *Config
|
|||
Matrix: cfg.Matrix,
|
||||
JobLoggerLevel: cfg.JobLoggerLevel,
|
||||
ActionCache: cfg.ActionCache,
|
||||
AutoRemove: true,
|
||||
}
|
||||
|
||||
runner, err := New(runnerConfig)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue