-
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
2b8c87d
commit 778a116
Showing
3 changed files
with
90 additions
and
57 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 |
---|---|---|
|
@@ -18,59 +18,14 @@ on: | |
- ".github/workflows/ci-dev-ops.yml" | ||
|
||
jobs: | ||
ops-int-test-setup: | ||
uses: ./.github/workflows/ci-local-setup.yml | ||
|
||
ops-int-test: | ||
runs-on: ubuntu-latest | ||
environment: local | ||
|
||
needs: [ops-int-test-setup] | ||
steps: | ||
- name: Checkout credbull-defi | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install yarn | ||
run: | | ||
corepack prepare yarn@stable --activate | ||
npm install -g yarn | ||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "yarn" | ||
|
||
- name: Install foundry-toolchain | ||
uses: foundry-rs/[email protected] | ||
with: | ||
version: nightly | ||
|
||
- name: Install Project Dependencies | ||
run: yarn install | ||
|
||
- 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 | ||
|
@@ -79,11 +34,6 @@ jobs: | |
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() }} | ||
ops-int-test-teardown: | ||
uses: ./.github/workflows/ci-local-teardown.yml | ||
needs: [ops-int-test] |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: ci-as-if-local-setup | ||
|
||
defaults: | ||
run: | ||
working-directory: . | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
setup-ci-as-if-local: | ||
runs-on: ubuntu-latest | ||
environment: local | ||
steps: | ||
- name: Checkout credbull-defi | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install yarn | ||
run: | | ||
corepack prepare yarn@stable --activate | ||
npm install -g yarn | ||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "yarn" | ||
|
||
- name: Install foundry-toolchain | ||
uses: foundry-rs/[email protected] | ||
with: | ||
version: nightly | ||
|
||
- name: Install Project Dependencies | ||
run: yarn install | ||
|
||
- 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 |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: ci-as-if-local-teardown | ||
|
||
defaults: | ||
run: | ||
working-directory: . | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
teardown-ci-as-if-local: | ||
runs-on: ubuntu-latest | ||
environment: local | ||
steps: | ||
- name: Shutdown Docker Compose Services | ||
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() }} |