diff --git a/.github/actions/setup-postgres-wallet-plugin/action.yml b/.github/actions/setup-postgres-wallet-plugin/action.yml new file mode 100644 index 0000000000..7ac41af866 --- /dev/null +++ b/.github/actions/setup-postgres-wallet-plugin/action.yml @@ -0,0 +1,17 @@ +name: Setup Postgres wallet plugin +description: Setup Postgres wallet plugin +author: 'sairanjit.tummalapalli@ayanworks.com' + +runs: + using: composite + steps: + - name: Setup Postgres wallet plugin + run: | + sudo apt-get install -y libzmq3-dev libsodium-dev pkg-config libssl-dev + curl https://sh.rustup.rs -sSf | bash -s -- -y + export PATH="/root/.cargo/bin:${PATH}" + cd ../ + git clone https://github.com/hyperledger/indy-sdk.git + cd indy-sdk/experimental/plugins/postgres_storage/ + cargo build --release + shell: bash diff --git a/.github/actions/setup-postgres/action.yml b/.github/actions/setup-postgres/action.yml new file mode 100644 index 0000000000..6e69e6574f --- /dev/null +++ b/.github/actions/setup-postgres/action.yml @@ -0,0 +1,12 @@ +name: Setup Postgres +description: Setup Postgres +author: 'sairanjit.tummalapalli@ayanworks.com' + +runs: + using: composite + steps: + - name: Setup Postgres + run: | + docker pull postgres + docker run --name postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres + shell: bash diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 38484e85d5..e2b0f158a0 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -11,6 +11,7 @@ on: env: TEST_AGENT_PUBLIC_DID_SEED: 000000000000000000000000Trustee9 GENESIS_TXN_PATH: network/genesis/local-genesis.txn + LD_LIBRARY_PATH: /home/runner/work/aries-framework-javascript/indy-sdk/experimental/plugins/postgres_storage/target/release # for Linux # Make sure we're not running multiple release steps at the same time as this can give issues with determining the next npm version to release. # Ideally we only add this to the 'release' job so it doesn't limit PR runs, but github can't guarantee the job order in that case: @@ -90,11 +91,16 @@ jobs: with: seed: ${TEST_AGENT_PUBLIC_DID_SEED} + - name: Setup Postgres + uses: ./.github/actions/setup-postgres + + - name: Setup Postgres wallet plugin + uses: ./.github/actions/setup-postgres-wallet-plugin + - name: Setup NodeJS uses: ./.github/actions/setup-node with: node-version: ${{ matrix.node-version }} - - name: Install dependencies run: yarn install