Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

Provenance Action

v1.1.0

Provenance Action

play

Provenance Action

Action to test Provenance and Smart Contracts

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Provenance Action

uses: provenance-io/[email protected]

Learn more about this action in provenance-io/provenance-testing-action

Choose a version

Provenance Testing 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.

Use as a github action

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


Smart Contract Actions

Testing

  • With a released version of Provenance

    - name: Smart Contract Test setup
        uses: provenance-io/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          provenance_version: "v1.11.1"
          test_script: "./scripts/name_test.sh"
  • With a development version of Provenance

    Note: provenance_version is a branch which has an associated Pull 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"

Generating governance proposals

- name: Smart Contract Test setup
    uses: provenance-io/[email protected]
    with:
      github_token: ${{ secrets.GITHUB_TOKEN }}
      provenance_version: "v1.11.1"
      test_script: "./scripts/name_test.sh"

After a successful run, the proposals will be added to an archive named $GITHUB_JOB_proposals 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.


Configuration

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
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