Skip to content

Commit

Permalink
Merge master to dev
Browse files Browse the repository at this point in the history
Fixes

Fixes

FIxes

Fixes
  • Loading branch information
Boldizsar Mezei committed Oct 22, 2023
1 parent d7d8d88 commit deb7772
Show file tree
Hide file tree
Showing 483 changed files with 9,897 additions and 8,621 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/node_modules
**/lib
**/scripts
45 changes: 26 additions & 19 deletions .github/workflows/action_deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@ jobs:
credentials_json: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SOONAVERSE }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'Use gcloud CLI'
run: 'gcloud info'
- name: Install dependencies
run: npm install
- name: Build Instance
run: npm run build:api
- name: Deploy Instance
- name: Build image
run: |
cp packages/api/Dockerfile .
gcloud builds submit --tag gcr.io/$GOOGLE_CLOUD_PROJECT/api
- name: Deploy
run: |
cd packages/api
npm run deploy:prod
gcloud run deploy api \
--image gcr.io/$GOOGLE_CLOUD_PROJECT/api \
--min-instances=3 \
--memory=1Gi \
--cpu=1 \
--concurrency=1000 \
--allow-unauthenticated \
--timeout=600 \
--ingress=internal-and-cloud-load-balancing \
--region=us-central1 \
deploy_functions:
runs-on: ubuntu-latest
environment: production
Expand All @@ -37,17 +44,17 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Set env vars
working-directory: packages/functions
run: echo "$FUNCTIONS_ENV_VARS" >> .env
env:
FUNCTIONS_ENV_VARS: ${{ secrets.FUNCTIONS_ENV_VARS_PROD }}
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
args: deploy --only functions,firestore:indexes -P soonaverse -f
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
credentials_json: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SOONAVERSE_TEST }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: Build and deploy
run: |
npm run create-deploy-script
chmod 777 ./deploy.sh
./deploy.sh
deploy_to_npm:
runs-on: ubuntu-latest
Expand Down
45 changes: 26 additions & 19 deletions .github/workflows/action_deploy-wen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,23 @@ jobs:
credentials_json: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SOONAVERSE_TEST }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'Use gcloud CLI'
run: 'gcloud info'
- name: Install dependencies
run: npm install
- name: Build Instance
run: npm run build:api
- name: Deploy Instance
- name: Build image
run: |
cp packages/api/Dockerfile .
gcloud builds submit --tag gcr.io/$GOOGLE_CLOUD_PROJECT/api
- name: Deploy
run: |
cd packages/api
npm run deploy:prod
gcloud run deploy api \
--image gcr.io/$GOOGLE_CLOUD_PROJECT/api \
--min-instances=3 \
--memory=1Gi \
--cpu=1 \
--concurrency=1000 \
--allow-unauthenticated \
--timeout=600 \
--ingress=internal-and-cloud-load-balancing \
--region=us-central1 \
deploy_functions:
runs-on: ubuntu-latest
environment: staging
Expand All @@ -38,17 +45,17 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Set env vars
working-directory: packages/functions
run: echo "$FUNCTIONS_ENV_VARS" >> .env
env:
FUNCTIONS_ENV_VARS: ${{ secrets.FUNCTIONS_ENV_VARS_TEST }}
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
args: deploy --only functions,firestore:indexes -P soonaverse-test -f
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
credentials_json: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SOONAVERSE_TEST }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: Build and deploy
run: |
npm run create-deploy-script
chmod 777 ./deploy.sh
./deploy.sh
roll-firestore:
runs-on: ubuntu-latest
Expand Down
76 changes: 38 additions & 38 deletions .github/workflows/functions_emulated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test:ci -- --findRelatedTests test/db.roll.spec.ts &&
npm run test:ci -- --findRelatedTests test/auth.spec.ts &&
npm run test:ci -- --findRelatedTests test/storage/resize.img.spec.ts &&
npm run test:ci -- --findRelatedTests test/stake/stake.reward.cron.spec.ts &&
npm run test:ci -- --findRelatedTests test/stake/delete.stake.reward.spec.ts &&
npm run test:ci -- --findRelatedTests test/cron/proposal.cron.spec.ts &&
npm run test:ci -- --findRelatedTests test/cron/nft-stake.cron.spec.ts
npm run test:ci -- --forceExit --findRelatedTests ./test/auth.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/address.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/collection.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/member.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/nft-bidding.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/nft.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/order.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -93,13 +93,13 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test:ci -- --findRelatedTests test/cron/floor-price.cron.only.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/workflow.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/workflow-online.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token.order.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token.expired.sale.cron.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token-trade.trigger.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token-trade.sell.spec.ts
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/project/project.create.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/project/project.deactivate.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/proposal.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/space.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/stake.reward.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/stamp.control.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token-distribution-auto-trigger.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -134,13 +134,13 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test:ci -- --findRelatedTests test/controls/token-trade.buy.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token-distribution.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token-distribution-auto-trigger.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/stamp.control.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/stake.reward.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/space.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/proposal.spec.ts
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token-distribution.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token-trade.buy.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token-trade.sell.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token-trade.trigger.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token.expired.sale.cron.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token.order.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token/token.airdrop.claim.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -175,13 +175,13 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test:ci -- --findRelatedTests test/controls/order.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/nft.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/nft-bidding.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/member.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/collection.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/address.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token/token.vote.spec.ts
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token/token.airdrop.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token/token.cancel.pub.sale.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token/token.create.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token/token.order.and.claim.air.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token/token.rank.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token/token.set.to.sale.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token/token.update.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -216,13 +216,13 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test:ci -- --findRelatedTests test/controls/token/token.update.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token/token.set.to.sale.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token/token.rank.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token/token.order.and.claim.air.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token/token.create.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token/token.cancel.pub.sale.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/token/token.airdrop.spec.ts
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/token/token.vote.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/workflow-online.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/workflow.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/cron/floor-price.cron.only.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/cron/nft-stake.cron.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/cron/proposal.cron.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/db.roll.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -257,9 +257,9 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json"
npm run milestone-sync &
firebase emulators:exec "
npm run test:ci -- --findRelatedTests test/controls/token/token.airdrop.claim.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/project/project.deactivate.spec.ts &&
npm run test:ci -- --findRelatedTests test/controls/project/project.create.spec.ts
npm run test:ci -- --forceExit --findRelatedTests ./test/stake/delete.stake.reward.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/stake/stake.reward.cron.spec.ts &&
npm run test:ci -- --forceExit --findRelatedTests ./test/storage/resize.img.spec.ts
" --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data
- name: Archive firestore data
uses: actions/upload-artifact@v3
Expand Down
Loading

0 comments on commit deb7772

Please sign in to comment.