Skip to content

Commit

Permalink
Changed as proven by sdk workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
jplodge-pro committed Jul 8, 2024
1 parent 142a377 commit 2b8c87d
Showing 1 changed file with 42 additions and 13 deletions.
55 changes: 42 additions & 13 deletions .github/workflows/ci-dev-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches:
- "main*"
- "development*"
- "fix-github-actions"
paths:
- "packages/ops/**"
- "packages/contracts/**"
Expand All @@ -19,10 +20,10 @@ on:
jobs:
ops-int-test:
runs-on: ubuntu-latest
environment: ci
environment: local

steps:
- name: Checkout
- name: Checkout credbull-defi
uses: actions/checkout@v4

- name: Install yarn
Expand All @@ -44,17 +45,45 @@ jobs:
- name: Install Project Dependencies
run: yarn install

- name: Run Ops tests
- name: Setup Local Environment
run: find . -type f -name ".env*.sample" -exec sh -c 'F={}; cp -nv $F $(dirname $F)/$(basename $F .sample)' \;

- name: Build Project
run: yarn build

- name: Setup Supabase CLI
uses: supabase/[email protected]
with:
version: latest

- name: Start Supabase
run: supabase start
working-directory: packages/api

- name: Run Docker Compose with Background Services
run: docker compose --env-file packages/api/.env up --detach --build --wait

- name: Deploy Credbull Contracts
run: yarn deploy
working-directory: packages/contracts

- name: Create Default Users
run: yarn op --create-default-users
working-directory: packages/ops

- name: Run Ops Integration Tests
run: yarn int-test
working-directory: packages/ops
env:
ENVIRONMENT: ${{ vars.ENVIRONMENT }}
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEVOPS_SEPOLIA_DEPLOYER_PRIVATE_KEY }}
ADMIN_PRIVATE_KEY: ${{ secrets.DEVOPS_SEPOLIA_ADMIN_PRIVATE_KEY }}
ALICE_PRIVATE_KEY: ${{ secrets.DEVOPS_SEPOLIA_ALICE_PRIVATE_KEY }}
BOB_PRIVATE_KEY: ${{ secrets.DEVOPS_SEPOLIA_BOB_PRIVATE_KEY }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
ADMIN_PASSWORD: NeverGuessThis
ALICE_PASSWORD: alice-1234
BOB_PASSWORD: bobword

- name: See API Logs, If Tests Failed
run: docker logs api
if: ${{ failure() }}

- name: Shutdown Docker Compose detached
run: docker compose --env-file packages/api/.env down
if: ${{ always() }}

- name: Stop Supabase
run: supabase stop --no-backup
working-directory: packages/api
if: ${{ always() }}

0 comments on commit 2b8c87d

Please sign in to comment.