Skip to content

Commit

Permalink
Open source
Browse files Browse the repository at this point in the history
Open source

Fixes

Fixes

Fixes

Fixes

Remove DEV bucket

Remove DEV bucket

Fixes
  • Loading branch information
Boldizsar Mezei committed May 19, 2024
1 parent cb2f0fc commit 8bfdb8f
Show file tree
Hide file tree
Showing 115 changed files with 1,684 additions and 4,854 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/action_deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,34 @@ jobs:
- name: Deploy to npm
run: |
npm publish --workspace packages/interfaces
cd packages/sdk/lib && npm publish
npm publish --workspace packages/sdk
database_roll:
runs-on: ubuntu-latest
environment: staging
needs: [deploy_functions]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.SERVICE_ACCOUNT }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: Set env vars
working-directory: packages/functions
run: echo "$ENV_VARS" > .env
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
- uses: mattes/gce-cloudsql-proxy-action@v1
with:
creds: '${{ secrets.SERVICE_ACCOUNT }}'
instance: buildcore-prod:us-central1:buildcore
- name: Build and deploy
run: |
npm run build:functions
cd packages/functions
npm run migrate
35 changes: 33 additions & 2 deletions .github/workflows/action_deploy-wen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
deploy_to_npm_as_next:
runs-on: ubuntu-latest
environment: staging
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
steps:
Expand All @@ -64,8 +65,8 @@ jobs:
npm run build:sdk
- name: Deploy to npm as "upcoming" package
run: |
npm publish --workspace packages/interfaces --tag next --access public
cd packages/sdk/lib && npm publish --tag next --access public
npm publish --workspace packages/interfaces --tag next
npm publish --workspace packages/sdk --tag next
deploy_functions:
runs-on: ubuntu-latest
Expand All @@ -92,3 +93,33 @@ jobs:
npm run create-deploy-script
chmod 777 ./deploy.sh
./deploy.sh
database_roll:
runs-on: ubuntu-latest
environment: staging
needs: [deploy_functions]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.SERVICE_ACCOUNT }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: Set env vars
working-directory: packages/functions
run: echo "$ENV_VARS" > .env
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
- uses: mattes/gce-cloudsql-proxy-action@v1
with:
creds: '${{ secrets.SERVICE_ACCOUNT }}'
instance: buildcore-test:us-central1:buildcore
- name: Build and deploy
run: |
npm run build:functions
cd packages/functions
npm run migrate
179 changes: 121 additions & 58 deletions .github/workflows/functions_emulated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:

chunk_0:
needs: npm-install
environment: development
runs-on: ubuntu-latest
timeout-minutes: 20

Expand Down Expand Up @@ -59,22 +60,31 @@ jobs:
packages/functions/node_modules
packages/interfaces/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }}
- name: Set env vars
working-directory: packages/functions
run: |
echo "$ENV_VARS" > .env
echo "$SERVICE_ACCOUNT" > sa.json
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
- name: Init
run: npm run build:functions
- name: Test
working-directory: packages/functions
run: |
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/auth.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/auth/legacy.auth.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/address.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/auction/auction.bid.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/collection.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/member.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/nft.spec.ts
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/auth.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/auth/legacy.auth.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/address.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/auction/auction.bid.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/collection.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/member.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/nft.spec.ts
chunk_1:
needs: npm-install
environment: development
runs-on: ubuntu-latest
timeout-minutes: 20

Expand Down Expand Up @@ -105,22 +115,31 @@ jobs:
packages/functions/node_modules
packages/interfaces/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }}
- name: Set env vars
working-directory: packages/functions
run: |
echo "$ENV_VARS" > .env
echo "$SERVICE_ACCOUNT" > sa.json
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
- name: Init
run: npm run build:functions
- name: Test
working-directory: packages/functions
run: |
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/controls/nft/nft.bidding.extends.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/nft/nft.bidding.finalize.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/nft/nft.bidding.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/nft/nft.set.for.sale.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/order.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/project/project.create.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/project/project.deactivate.spec.ts
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/controls/nft/nft.bidding.extends.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/nft/nft.bidding.finalize.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/nft/nft.bidding.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/nft/nft.set.for.sale.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/order.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/project/project.create.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/project/project.deactivate.spec.ts
chunk_2:
needs: npm-install
environment: development
runs-on: ubuntu-latest
timeout-minutes: 20

Expand Down Expand Up @@ -151,22 +170,31 @@ jobs:
packages/functions/node_modules
packages/interfaces/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }}
- name: Set env vars
working-directory: packages/functions
run: |
echo "$ENV_VARS" > .env
echo "$SERVICE_ACCOUNT" > sa.json
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
- name: Init
run: npm run build:functions
- name: Test
working-directory: packages/functions
run: |
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/controls/proposal.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/space.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/stake.reward.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/stamp.control.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token-distribution-auto-trigger.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token-distribution.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token-trade.buy.spec.ts
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/controls/proposal.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/space.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/stake.reward.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/stamp.control.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token-distribution-auto-trigger.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token-distribution.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token-trade.buy.spec.ts
chunk_3:
needs: npm-install
environment: development
runs-on: ubuntu-latest
timeout-minutes: 20

Expand Down Expand Up @@ -197,22 +225,31 @@ jobs:
packages/functions/node_modules
packages/interfaces/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }}
- name: Set env vars
working-directory: packages/functions
run: |
echo "$ENV_VARS" > .env
echo "$SERVICE_ACCOUNT" > sa.json
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
- name: Init
run: npm run build:functions
- name: Test
working-directory: packages/functions
run: |
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/controls/token-trade.sell.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token-trade.trigger.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token.expired.sale.cron.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token.order.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.airdrop.claim.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.airdrop.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.cancel.pub.sale.spec.ts
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/controls/token-trade.sell.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token-trade.trigger.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token.expired.sale.cron.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token.order.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.airdrop.claim.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.airdrop.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.cancel.pub.sale.spec.ts
chunk_4:
needs: npm-install
environment: development
runs-on: ubuntu-latest
timeout-minutes: 20

Expand Down Expand Up @@ -243,22 +280,31 @@ jobs:
packages/functions/node_modules
packages/interfaces/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }}
- name: Set env vars
working-directory: packages/functions
run: |
echo "$ENV_VARS" > .env
echo "$SERVICE_ACCOUNT" > sa.json
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
- name: Init
run: npm run build:functions
- name: Test
working-directory: packages/functions
run: |
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.create.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.order.and.claim.air.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.rank.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.set.to.sale.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.update.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.vote.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/workflow.spec.ts
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.create.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.order.and.claim.air.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.rank.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.set.to.sale.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.update.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/token/token.vote.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/controls/workflow.spec.ts
chunk_5:
needs: npm-install
environment: development
runs-on: ubuntu-latest
timeout-minutes: 20

Expand Down Expand Up @@ -289,22 +335,31 @@ jobs:
packages/functions/node_modules
packages/interfaces/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }}
- name: Set env vars
working-directory: packages/functions
run: |
echo "$ENV_VARS" > .env
echo "$SERVICE_ACCOUNT" > sa.json
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
- name: Init
run: npm run build:functions
- name: Test
working-directory: packages/functions
run: |
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/cron/floor-price.cron.only.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/cron/nft-stake.cron.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/cron/proposal.cron.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/db.roll.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/func.name.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/naming.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/stake/delete.stake.reward.spec.ts
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/cron/floor-price.cron.only.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/cron/nft-stake.cron.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/cron/proposal.cron.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/db.roll.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/func.name.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/naming.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/stake/delete.stake.reward.spec.ts
chunk_6:
needs: npm-install
environment: development
runs-on: ubuntu-latest
timeout-minutes: 20

Expand Down Expand Up @@ -335,12 +390,20 @@ jobs:
packages/functions/node_modules
packages/interfaces/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }}
- name: Set env vars
working-directory: packages/functions
run: |
echo "$ENV_VARS" > .env
echo "$SERVICE_ACCOUNT" > sa.json
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
- name: Init
run: npm run build:functions
- name: Test
working-directory: packages/functions
run: |
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/stake/stake.reward.cron.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/storage/resize.img.spec.ts
npm run start &
npm run notifier &
npm run test -- --findRelatedTests --forceExit ./test/stake/stake.reward.cron.spec.ts &&
npm run test -- --findRelatedTests --forceExit ./test/storage/resize.img.spec.ts
16 changes: 4 additions & 12 deletions .github/workflows/functions_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,14 @@ jobs:
lint-and-prettier:
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: packages/functions
steps:
# - name: Collect Workflow Telemetry
# uses: runforesight/foresight-workflow-kit-action@v1
# if: ${{ always() }}
# with:
# api_key: ${{ secrets.FORESIGHT_KEY }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: cd ../../ && npm run build:functions
- name: Lint
run: npm run lint
run: npm run build:functions
- name: Prettier
run: npx prettier --check .
run: npx prettier --check packages/functions
- name: Lint
run: cd packages/functions && npm run lint
Loading

0 comments on commit 8bfdb8f

Please sign in to comment.