To prepare for a smooth merge in the runner codebase.
- run with --fix for gofumpt and golangci
- manual edits for
- disabling useless package naming warning
- rename variables that had underscore in their name
- remove trailing else at the end of a few functions
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/206
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>
- the model defines them as strings and can parse them either as string or their effective type (boolean, number)
- add workflow validation when reading all testdata
- add fail-fast, max-parallel, timeout-minutes, cancel-timeout-minutes to test workflows in the jobparser tests
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/203
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>
If not the schema validation will fail because it will be try to validate as if not calling a reusable workflow.
```
=== RUN TestWorkflowCallRunsOn
schema_test.go:119:
Error Trace: /home/earl-warren/software/act/pkg/schema/schema_test.go:119
Error: Received unexpected error:
Line: 10 Column 5: Failed to match job-factory: Line: 12 Column 5: Unknown Property uses
Line: 13 Column 5: Unknown Property with
Line: 15 Column 5: Unknown Property secrets
Line: 10 Column 5: Failed to match workflow-job: Line: 11 Column 5: Unknown Property runs-on
Test: TestWorkflowCallRunsOn
```
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/194
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 created confusion when the interpretation of the absence of `runs-on` changed unexpectedly. Making it mandatory fixes this ambiguity.
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/192
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>
Otherwise act would reject such workflows right away
(cherry picked from commit efc95959aca96034426dcb93275eede5a3f47b83)
Conflicts:
pkg/schema/workflow_schema.json
trivial context conflict