fix: update mockdata #105
Workflow file for this run
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
name: "cli: test" | |
on: | |
push: | |
branches-ignore: | |
- "master" | |
paths: | |
- "cli/**" | |
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 | |
redis: | |
image: redis | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20.10.0" | |
- name: Install yarn dependencies | |
run: yarn install | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21.5" | |
check-latest: true | |
cache-dependency-path: | | |
./api/go.sum | |
- name: Install golang-migrate | |
run: | | |
curl -L https://github.com/golang-migrate/migrate/releases/download/v4.17.0/migrate.linux-amd64.tar.gz | tar xvz | |
sudo mv ./migrate /usr/bin | |
- name: Install api dependencies | |
run: | | |
cd ./api | |
go mod tidy | |
- 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: | | |
cd ./api | |
migrate -database "postgresql://postgres:postgres@localhost:5432/orakl-test?search_path=public&sslmode=disable" -verbose -path ./migrations up | |
- 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: | | |
cd ./api | |
go run main.go & | |
env: | |
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl-test?search_path=public" | |
ENCRYPT_PASSWORD: "abc123" | |
APP_PORT: "3000" | |
REDIS_HOST: "localhost" | |
REDIS_PORT: "6379" | |
- name: Run tests | |
run: yarn cli build && yarn cli test | |
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" |