The Graph Runner is a CLI tool and the core of the Actionforge project. It is designed for high-performance executions of action graphs.
Use the --help
option to get more details about the command their options.
graph-runner --help
The basic command to run an action graph is:
graph-runner ./example-graph.yml
To run the Graph Runner, ensure you have Go installed. The required Go version is specified in the go.mod file. You can find the installation guidelines for Go here.
Before running any commands, first install the necessary dependencies:
go mod tidy
Graph Runner offers two build options:
-
With GitHub Actions workflow support:
go build -o graph-runner .
-
Without GitHub Actions workflow support:
go build -tags=github_impl -o graph-runner .
This project includes a VS Code DevContainer configuration. It pre-configures VS Code with all required tools and extensions for this project. To use this feature, install the Dev Containers extension. You can find a tutorial on how to use DevContainers here.
The Graph Runner comes with three types of tests:
- Unit Tests: For small individual functions and components, located in /unit_tests/.
- Integration Tests: For testing component interactions. These are
*_test.go
files outside theunit_tests
directory. - System Tests: For testing the entire CLI functionality, located in /system_tests/.
Tests can be run in VS Code using CodeLens1 or through the following shell commands:
-
Unit Tests:
go test ./... -v -coverpkg=./... -cover -coverprofile cover.out --tags=unit_tests,github_impl
-
Integration Tests:
go test ./... -v -coverpkg=./... -cover -coverprofile cover.out --tags=integration_tests,github_impl
-
System Tests:
go test ./... -v -coverpkg=./... -cover -coverprofile cover.out --tags=integration_tests,system_tests,github_impl
-
All Tests:
go test ./... -v -coverpkg=./... -cover -coverprofile cover.out --tags=unit_tests,integration_tests,system_tests,github_impl # With race detection: go test ./... -v -race -coverpkg=./... -cover -coverprofile cover.out --tags=unit_tests,integration_tests,system_tests,github_impl
After running one or more tests, generate a coverage report in HTML format using the following command:
go tool cover -html cover.out -o cover.html
This software is licensed under the Actionforge Community License that you can find here.
Commercial licenses (including sublicensing) are available by email. Get in touch.
Footnotes
-
CodeLens provides inline commands in VS Code, positioned above test functions. β©