-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
142a377
commit 2b8c87d
Showing
1 changed file
with
42 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ on: | |
branches: | ||
- "main*" | ||
- "development*" | ||
- "fix-github-actions" | ||
paths: | ||
- "packages/ops/**" | ||
- "packages/contracts/**" | ||
|
@@ -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 | ||
|
@@ -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() }} |