GitHub Action
Provenance Action
A Github action to simplify testing with the Provenance blockchain.
This action setups up Provenance in a docker container and allows the user to pass in both the version of provenance to use as well as a test script. After Provenance is up running the test script is executed. This allows testing of any of Provenance's features inside of this docker container as part of a github release process.
For an example of this in use look at the smart contract tests in provwasm
link
This action is published and can be brought into any project with the following:
- name: Smart Contract Test setup
uses: provenance-io/[email protected]
id: tutorial
with:
provenance_version: "v1.8.0"
test_script: "./scripts/name_test.sh"
The docker image is deployed at: https://hub.docker.com/r/provenanceio/provenance-testing-action
This image can be downloaded and run. However to do so, instead of just running the image you will need to pull the image, create a container, copy the test script and any files it needs into the container and then run it like the following pulled from the Makefile
in Provwasm
.PHONY: test-tutorial
test-tutorial: tutorial optimize-tutorial
docker rm -f test_container || true
docker pull provenanceio/provenance-testing-action
docker create --name test_container provenanceio/provenance-testing-action --entrypoint "/scripts/tutorial_test.sh" "$(PROVENANCE_TEST_VERSION)"
docker cp ./scripts test_container:/scripts
docker cp ./contracts test_container:/go/contracts
docker start test_container