To get involved with this project, create a fork and follow along.
TTPForge is tested and built in Github Actions using the Golang version from this configuration file:
https://github.com/facebookincubator/TTPForge/blob/main/.github/workflows/tests.yaml
It is recommended to use the same version when developing locally. You can install this Golang version from the official Golang website.
With the appropriate Golang version installed as per the instructions above, you can now run our unit tests:
go test ./...
and subsequently build your own copy of the TTPForge binary:
go build -o ttpforge
Finally, you can run our integration tests against your binary with the command:
./integration_tests.sh ./ttpforge
When you submit your change as a pull request to our repository, a variety of linting and testing workflows will be triggered. If you wish to run any of these workflows locally to fix a failure, you can do so with the act tool. For example, you can run the markdownlint action as follows:
act -W .github/workflows/markdownlint.yaml
Several of the linters in this project may be used as pre-commit hooks if desired - you can install and setup pre-commit according to the official instructions.
For quick ad hoc runs, you may wish to run pre-commit in a virtual environment:
python3 -m venv venv
. venv/bin/activate
pip3 install pre-commit
pre-commit run --all-files
You can also run pre-commit locally using act
, as described in the previous
section.