Skip to content

Commit

Permalink
use scaleway mac
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipndev committed Feb 7, 2024
1 parent 6c082a4 commit c1f05f3
Show file tree
Hide file tree
Showing 196 changed files with 2,274 additions and 489 deletions.
13 changes: 5 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ jobs:
paths:
- android/app/build
e2e_run_android:
environment:
TEST_ENV: Local
executor:
name: android/android-machine
resource-class: xlarge
Expand Down Expand Up @@ -158,11 +156,8 @@ jobs:
- ios/build/Build/Products/Debug-iphonesimulator/Blink.app

e2e_run_ios:
environment:
GALOY_STAGING_GLOBAL_OTP: 403370
macos:
xcode: 14.2.0
resource_class: macos.x86.medium.gen2
machine: true
resource_class: galoymoney/mac
shell: /bin/bash --login -o pipefail
working_directory: ~/galoy-mobile
steps:
Expand All @@ -173,9 +168,11 @@ jobs:
brew install applesimutils
- install_yarn_deps
- nix-with-flake
# - local_backend
- local_backend
- rn/ios_simulator_start:
device: iPhone SE (3rd generation)
- metro_start
- wait_for_backend_ready
- run: yarn e2e:test ios.sim.debug -d -R 5 --take-screenshots all --record-videos all --record-logs all
- store_artifacts:
path: artifacts
Expand Down
2 changes: 0 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ if [ -f ".env.local" ]; then
fi

use flake .

export TEST_ENV="Local"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ ios/GoogleService-Info.plist
.yalc
yalc.lock

*.tmp.ci
*.log
.env.local
.env.tmp.ci
.dependencies
ios/assets
ios/GaloyApp/assets
Expand Down
4 changes: 2 additions & 2 deletions dev/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALICE_PHONE="+16505554328"
BOB_PHONE="+16505554329"
ALICE_PHONE="+919876540001"
BOB_PHONE="+919876540002"
15 changes: 12 additions & 3 deletions dev/Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ local_resource(
)

docker_compose('vendor/galoy-quickstart/docker-compose.yml')
galoy_services = ["apollo-router", "galoy", "trigger", "redis", "mongodb", "mongodb-migrate", "price", "price-history", "price-history-migrate", "postgres-price-history", "svix", "svix-pg", "stablesats"]
auth_services = ["oathkeeper", "kratos", "kratos-pg", "hydra", "postgresdhydra", "hydra-migrate"]
bitcoin_services = ["bitcoind", "bitcoind-signer", "lnd1", "lnd-outside-1", "bria", "postgres-bria", "fulcrum"]
galoy_services = ["apollo-router", "galoy", "trigger", "redis", "mongodb", "mongodb-migrate", "price", "price-history", "price-history-migrate", "price-history-pg", "svix", "svix-pg", "stablesats"]
auth_services = ["oathkeeper", "kratos", "kratos-pg", "hydra", "hydra-pg", "hydra-migrate"]
bitcoin_services = ["bitcoind", "bitcoind-signer", "lnd1", "lnd-outside-1", "bria", "bria-pg", "fulcrum"]

for service in galoy_services:
dc_resource(service, labels = ["galoy"])
Expand All @@ -40,3 +40,12 @@ local_resource(
"init-lightning"
]
)

local_resource(
name='blocks',
labels = ['dev-setup'],
cmd='bin/blocks.sh',
resource_deps = [
"init-setup"
]
)
12 changes: 12 additions & 0 deletions dev/bin/blocks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

REPO_ROOT=$(git rev-parse --show-toplevel)

source ${REPO_ROOT}/dev/vendor/galoy-quickstart/bin/helpers.sh

while true; do
bitcoin_cli -generate 1
sleep 2
done
6 changes: 3 additions & 3 deletions dev/vendir.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ apiVersion: vendir.k14s.io/v1alpha1
directories:
- contents:
- git:
commitTitle: 'chore(release): [ci skip] bump quickstart image to sha256@058c67fad4e1b8b83eafec932239d7bf29563e101851a688f066408a07373819'
sha: 68cd7b5e22a5eb0dc1ebe6a646ab68df1d657ffd
commitTitle: 'feat: adding suggest and approve endpoint for the map (#3937)'
sha: d2f6f35ab4fb67397094684d4b7fc0cf79d47111
tags:
- 0.18.3
- 0.20.42
path: galoy-quickstart
path: vendor
kind: LockConfig
2 changes: 1 addition & 1 deletion dev/vendir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ directories:
- path: galoy-quickstart
git:
url: https://github.com/GaloyMoney/galoy.git
ref: '0.18.3'
ref: '0.20.42'
includePaths:
- quickstart/bin/*
- quickstart/dev/**/*
Expand Down
3 changes: 2 additions & 1 deletion dev/vendor/galoy-quickstart/.env.galoy
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ MATTERMOST_WEBHOOK_URL=https://chat.galoy.io/hooks/sometoken
UNSECURE_DEFAULT_LOGIN_CODE=000000
SVIX_SECRET=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTE2NzIwMTQsImV4cCI6MjAwNzAzMjAxNCwibmJmIjoxNjkxNjcyMDE0LCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.b9s0aWSisNdUNki4edabBEToLNSwjC9-AiJQr4J3y4E
SVIX_ENDPOINT=http://svix:8071
SVIX_CALLBACK_URL=http://bats-tests:8080/webhook/

BRIA_API_KEY=bria_dev_000000000000000000000

Expand All @@ -64,3 +63,5 @@ UNSECURE_IP_FROM_REQUEST_OBJECT=true

HYDRA_PUBLIC_API="http://hydra:4444"
HYDRA_ADMIN_API="http://hydra:4445"

NOTIFICATIONS_HOST="dummy"
2 changes: 1 addition & 1 deletion dev/vendor/galoy-quickstart/bin/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ bitcoin_signer_cli() {
}

gql_file() {
echo "$GALOY_DIR/galoy/test/bats/gql/$1.gql"
echo "$GALOY_DIR/graphql/gql/$1.gql"
}

gql_query() {
Expand Down
2 changes: 1 addition & 1 deletion dev/vendor/galoy-quickstart/bin/init-onchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bitcoin_cli createwallet "outside" || true
bitcoin_cli -generate 200 > /dev/null 2>&1

bitcoin_signer_cli createwallet "dev" || true
bitcoin_signer_cli -rpcwallet=dev importdescriptors "$(cat $GALOY_DIR/galoy/test/bats/bitcoind_signer_descriptors.json)"
bitcoin_signer_cli -rpcwallet=dev importdescriptors "$(cat $GALOY_DIR/dev/config/bitcoind/bitcoind_signer_descriptors.json)"

echo "Checking that bria is running..."

Expand Down
11 changes: 2 additions & 9 deletions dev/vendor/galoy-quickstart/bin/re-render.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@
set -e

REPO_ROOT=$(git rev-parse --show-toplevel)
GALOY_ROOT_DIR=${REPO_ROOT}/quickstart/galoy
DEV_ROOT_DIR=${REPO_ROOT}/quickstart/dev

pushd ${REPO_ROOT}/quickstart

ytt -f vendir > vendir.yml
vendir sync

ytt -f ./docker-compose.tmpl.yml -f ${GALOY_ROOT_DIR}/docker-compose.yml > docker-compose.yml

pushd ${GALOY_ROOT_DIR}
source .env
mkdir -p "${GALOY_ROOT_DIR}/../vendor/galoy-quickstart/env"

export OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-agent:4318
envsubst < .env.ci | grep -v '^LND2' > ${GALOY_ROOT_DIR}/../.env.galoy
ytt -f ./docker-compose.tmpl.yml -f ${DEV_ROOT_DIR}/docker-compose.deps.yml > docker-compose.yml
99 changes: 99 additions & 0 deletions dev/vendor/galoy-quickstart/dev/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
load("@toolchains//rover:macros.bzl", "supergraph", "diff_check", "dev_update_file")
load( ":tilt.bzl", "tilt",)

# Bring up the full set of services for development
tilt(
name = "up",
subcmd = "up",
)

# Bring down any remaining/running services
tilt(
name = "down",
subcmd = "down",
)

python_bootstrap_binary(
name = "healthcheck",
main = "healthcheck.py",
visibility = ["PUBLIC"],
)

supergraph(
name = "supergraph",
config = "config/apollo-federation/supergraph-config.yaml",
subgraphs = {
"API_KEYS_SCHEMA": "//core/api-keys:sdl",
"NOTIFICATIONS_SCHEMA": "//core/notifications:sdl",
"PUBLIC_SCHEMA": "//core/api:public-sdl",
},
)

diff_check(
name = "supergraph-diff",
original = "config/apollo-federation/supergraph.graphql",
new = ":supergraph"
)

test_suite(
name = "check-sdls",
tests = [
":supergraph-diff",
"//core/api:public-schema-diff",
"//core/api:admin-schema-diff",
"//core/api-keys:schema-diff",
"//core/notifications:schema-diff",
],
)

dev_update_file(
name = "update-supergraph",
generated = ":supergraph",
out = "config/apollo-federation/supergraph.graphql"
)

dev_update_file(
name = "update-core-supergraph",
generated = ":supergraph",
out = "../core/api/dev/apollo-federation/supergraph.graphql"
)

sh_binary(
name = "update-schemas",
main = "bin/update-schemas.sh",
)

sh_binary(
name = "init-onchain",
main = "bin/init-onchain.sh",
)

sh_binary(
name = "init-lightning",
main = "bin/init-lightning.sh",
)

sh_binary(
name = "init-user",
main = "bin/init-user.sh",
)

sh_binary(
name = "setup-hydra-client",
main = "bin/setup-hydra-client.sh",
)

sh_binary(
name = "stoppable-trigger",
main = "bin/run-stoppable-trigger.sh",
)

sh_binary(
name = "add-test-users-with-usernames",
main = "bin/add-test-users-with-usernames.sh",
)

sh_binary(
name = "fund-user",
main = "bin/fund-user.sh",
)
Loading

0 comments on commit c1f05f3

Please sign in to comment.