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.
This action is published and can be brought into any project. For an example of this in use look at this repository's test workflow
-
- name: Smart Contract Test setup uses: provenance-io/[email protected] with: github_token: ${{ secrets.GITHUB_TOKEN }} provenance_version: "v1.16.0" smart_contract_action_version: "latest" test_script: "./scripts/name_test.sh"
-
Note:
provenance_version
is a branch which has an associatedPull Request
and a successful run of the Provenance Build and Release action- name: Smart Contract Test setup uses: provenance-io/[email protected] with: github_token: ${{ secrets.GITHUB_TOKEN }} provenance_version: "issue/new-feature" smart_contract_action_version: "latest" test_script: "./scripts/name_test.sh"
- name: Smart Contract Test setup
uses: provenance-io/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
provenance_version: "v1.16.0"
smart_contract_action_version: "latest"
init_data: "./smart_contract_action/test/init_data"
test_script: "./smart_contract_action/scripts/name_test.sh"
Key | Type | Required | Description |
---|---|---|---|
github_token |
token | Required | set to ${{ secrets.GITHUB_TOKEN }} |
provenance_version |
string | Required | Version of Provenance to test, either a release or a branch |
smart_contract_action_version |
string | Required | Version of the Smart Contract Test action docker image |
init_data |
string | Optional | The directory that contains the initial seed data for Provenance. It should contain the config , data , and keyring-test directories. Example: init_data |
test_script |
string | Optional | Script used to run tests after provenance has been setup and is running |