Skip to content

Commit

Permalink
ci: add yml for postgres setup (openwallet-foundation#703)
Browse files Browse the repository at this point in the history
Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
  • Loading branch information
Sai Ranjit Tummalapalli authored and karimStekelenburg committed Apr 22, 2022
1 parent 1797711 commit 32303c6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/actions/setup-postgres-wallet-plugin/action.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions .github/actions/setup-postgres/action.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 7 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 32303c6

Please sign in to comment.