-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test codes test: fix typo test: update yaml for test purpose fix: fix typo fix: remove test.txt fix: use single db with different schemas fix: fix port test fix: update test yaml test test: remove sign test fix: lint test codes fix: add api app port fix: add cli build process into yaml test fix: update test remove delegator test test remove delegator test test test update yaml for easier test test test test: seperate migration steps fix: remove multiple db script wip nohoist setup fix typo rollback nohoist fix: no hoist required for separated prisma client
- Loading branch information
1 parent
7c20632
commit 180e77f
Showing
5 changed files
with
98 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: "cli: test" | ||
|
||
on: | ||
push: | ||
branches: | ||
i-985/test/add-cli-test-yaml | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: orakl-test | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.12" | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Delegator db migrate | ||
run: yarn delegator prisma-migrate dev --name init-delegator | ||
env: | ||
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/delegator?schema=public" | ||
|
||
- name: Api db migrate | ||
run: yarn api prisma-migrate dev --name init-api | ||
env: | ||
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl?schema=public" | ||
|
||
- name: Run delegator | ||
run: yarn delegator build && yarn delegator start & | ||
env: | ||
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/delegator?schema=public" | ||
PROVIDER_URL: "https://api.baobab.klaytn.net:8651" | ||
APP_PORT: "3002" | ||
|
||
- name: Run api | ||
run: yarn api build && yarn api start & | ||
env: | ||
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl?schema=public" | ||
ENCRYPT_PASSWORD: "abc123" | ||
APP_PORT: "3000" | ||
|
||
- name: Run tests | ||
run: yarn cli build && yarn cli test ./cli/test/chain.test.ts ./cli/test/delegator.ts | ||
env: | ||
ORAKL_NETWORK_API_URL: "http://127.0.0.1:3000/api/v1" | ||
ORAKL_NETWORK_DELEGATOR_URL: "http://127.0.0.1:3002/api/v1" |
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
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
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
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