GitHub Action
Provenance Action
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.13.0" 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" 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.13.0"
test_script: "./scripts/name_test.sh"
generate_proposals: true
- name: Smart Contract Test setup
uses: provenance-io/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
provenance_version: "v1.13.0"
init_data: "./smart_contract_action/test/init_data"
test_script: "./smart_contract_action/scripts/name_test.sh"
generate_proposals: true
After a successful run, the proposals will be added to an archive named $GITHUB_JOB_proposals.zip
and attached to the build.
IMPORTANT: The json proposals have placeholders for user-specific data (e.g., title, account addresses, code_id). These placeholders must be replaced in order to submit the proposal.
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 |
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 |
generate_proposals |
boolean | Optional | Generate the store, instantiate, and migrate governance proposals |
wasm_path |
string | Optional | Path to the smart contract wasm |