diff --git a/.github/workflows/functions_tangle-online-unit-tests_emulator.yml b/.github/workflows/functions_tangle-online-unit-tests_emulator.yml index 15858c7737..731452d8a7 100644 --- a/.github/workflows/functions_tangle-online-unit-tests_emulator.yml +++ b/.github/workflows/functions_tangle-online-unit-tests_emulator.yml @@ -1018,7 +1018,7 @@ jobs: firebase emulators:exec " npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-staking/nft-staking_2.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-staking/nft-staking_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-set-for-sale/nft-set-for-sale_2.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-set-for-sale/nft-set-for-sale_3.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1053,9 +1053,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-set-for-sale/nft-set-for-sale_2.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-set-for-sale/nft-set-for-sale_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_4.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_3.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1090,9 +1090,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_3.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_2.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_9.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1127,9 +1127,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_9.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_8.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_7.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_6.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_7.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1164,9 +1164,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_6.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_5.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_4.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_3.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1201,9 +1201,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_3.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_2.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_18.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_17.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_18.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1238,9 +1238,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_17.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_16.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_14.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_13.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_14.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1275,9 +1275,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_13.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_12.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_11.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_10.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_11.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1312,9 +1312,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_10.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_4.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_2.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1349,9 +1349,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_2.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_8.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_7.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_8.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1386,9 +1386,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_7.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_6.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_5.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_4.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_5.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1423,9 +1423,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_4.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_3.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_2.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_10.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_2.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1460,9 +1460,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_10.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_7.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_6.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_7.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1497,9 +1497,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_6.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_5.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_4.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_3.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1534,9 +1534,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_3.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_2.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_9.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1571,9 +1571,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_9.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_8.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_7.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_6.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_7.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1608,9 +1608,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_6.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_5.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_4.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_3.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1645,9 +1645,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_3.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_2.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_12.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_11.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_12.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1682,9 +1682,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_11.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_10.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_7.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1719,9 +1719,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_7.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_6.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_5.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_4.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_5.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1756,9 +1756,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_4.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_3.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_2.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_12.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_2.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1793,9 +1793,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_12.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_10.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_6.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1830,9 +1830,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_6.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_5.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_4.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_3.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1867,9 +1867,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_3.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_2.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_1.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_9.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1904,9 +1904,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_9.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_8.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_7.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_6.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_7.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1941,9 +1941,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_6.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_5.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_4.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_3.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1978,9 +1978,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_3.spec.ts && npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_2.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_10.spec.ts && - npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_1.spec.ts + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_10.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1989,3 +1989,38 @@ jobs: name: firestore-data-test-tangle-online-chunk_52 path: ./packages/functions/firestore-data/ retention-days: 1 + chunk_53: + needs: npm-install + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + - uses: actions/cache@v3 + with: + path: | + node_modules + packages/functions/node_modules + packages/interfaces/node_modules + key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }} + - name: Init + run: | + npm run build:functions + npm install -g firebase-tools + - name: Test + working-directory: packages/functions + run: | + export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" + npm run milestone-sync & + firebase emulators:exec " + npm run test-tangle-online:ci -- --findRelatedTests test-tangle/award/award_1.spec.ts + " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data + - name: Archive firestore data + uses: actions/upload-artifact@v3 + if: ${{ failure() }} + with: + name: firestore-data-test-tangle-online-chunk_53 + path: ./packages/functions/firestore-data/ + retention-days: 1 diff --git a/.github/workflows/functions_tangle-unit-tests.yml b/.github/workflows/functions_tangle-unit-tests.yml index fa19991cd3..36fd996d14 100644 --- a/.github/workflows/functions_tangle-unit-tests.yml +++ b/.github/workflows/functions_tangle-unit-tests.yml @@ -1016,7 +1016,7 @@ jobs: firebase emulators:exec " npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-staking/nft-staking_2.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-staking/nft-staking_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-set-for-sale/nft-set-for-sale_2.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-set-for-sale/nft-set-for-sale_3.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1051,9 +1051,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-set-for-sale/nft-set-for-sale_2.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-set-for-sale/nft-set-for-sale_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_4.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_3.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1088,9 +1088,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_3.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_2.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_9.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/nft-bid/nft-bid.otr_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1125,9 +1125,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_9.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_8.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_7.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_6.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_7.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1162,9 +1162,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_6.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_5.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_4.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_3.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1199,9 +1199,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_3.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_2.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_18.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_17.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_18.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1236,9 +1236,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_17.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_16.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_14.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_13.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_14.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1273,9 +1273,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_13.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_12.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_11.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_10.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_11.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1310,9 +1310,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_10.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_4.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_2.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1347,9 +1347,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_2.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-airdrop/minted-token-airdrop_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_8.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_7.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_8.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1384,9 +1384,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_7.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_6.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_5.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_4.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_5.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1421,9 +1421,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_4.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_3.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_2.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_10.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_2.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1458,9 +1458,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_10.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_7.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_6.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_7.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1495,9 +1495,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_6.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_5.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_4.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_3.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1532,9 +1532,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_3.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_2.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_9.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/metadata-nft/mint-metadata-nft_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1569,9 +1569,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_9.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_8.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_7.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_6.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_7.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1606,9 +1606,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_6.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_5.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_4.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_3.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1643,9 +1643,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_3.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_2.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_12.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_11.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_12.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1680,9 +1680,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_11.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_10.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_7.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/collection-minting/collection-minting_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1717,9 +1717,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_7.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_6.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_5.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_4.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_5.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1754,9 +1754,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_4.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_3.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_2.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_12.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_2.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1791,9 +1791,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_12.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_10.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_6.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1828,9 +1828,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_6.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_5.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_4.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_3.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1865,9 +1865,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_3.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_2.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_1.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_9.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/award-tangle/award-tangle_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1902,9 +1902,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_9.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_8.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_7.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_6.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_7.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1939,9 +1939,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_6.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_5.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_4.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_3.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_4.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -1976,9 +1976,9 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_3.spec.ts && npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_2.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_10.spec.ts && - npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_1.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_10.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -2013,7 +2013,7 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_15.only.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/award/award_1.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -2048,7 +2048,7 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " - npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_11.only.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-token-trade/minted-token-trade_15.only.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -2083,7 +2083,7 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " - npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_9.only.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_11.only.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -2118,7 +2118,7 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " - npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_8.only.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_9.only.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -2153,7 +2153,7 @@ jobs: export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" npm run milestone-sync & firebase emulators:exec " - npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_11.only.spec.ts + npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_8.only.spec.ts " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data - name: Archive firestore data uses: actions/upload-artifact@v3 @@ -2162,3 +2162,38 @@ jobs: name: firestore-data-test-tangle-chunk_57 path: ./packages/functions/firestore-data/ retention-days: 1 + chunk_58: + needs: npm-install + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + - uses: actions/cache@v3 + with: + path: | + node_modules + packages/functions/node_modules + packages/interfaces/node_modules + key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }} + - name: Init + run: | + npm run build:functions + npm install -g firebase-tools + - name: Test + working-directory: packages/functions + run: | + export GOOGLE_APPLICATION_CREDENTIALS="./test-service-account-key.json" + npm run milestone-sync & + firebase emulators:exec " + npm run test-tangle:ci -- --findRelatedTests test-tangle/base-token-trading/base-token-trading_11.only.spec.ts + " --project dev --only functions,firestore,storage,ui,auth --export-on-exit=./firestore-data + - name: Archive firestore data + uses: actions/upload-artifact@v3 + if: ${{ failure() }} + with: + name: firestore-data-test-tangle-chunk_58 + path: ./packages/functions/firestore-data/ + retention-days: 1 diff --git a/packages/database/scripts/db.upgrade.ts b/packages/database/scripts/db.upgrade.ts new file mode 100644 index 0000000000..851694db62 --- /dev/null +++ b/packages/database/scripts/db.upgrade.ts @@ -0,0 +1,41 @@ +import { COL } from '@build-5/interfaces'; +import crypto from 'crypto'; +import dotenv from 'dotenv'; +import admin from 'firebase-admin'; +import { getFirestore } from 'firebase-admin/firestore'; +import fs from 'fs'; +import { globSync } from 'glob'; +import { FirebaseApp } from '../src/app/app'; +import serviceAccount from './serviceAccountKey.json'; + +dotenv.config({ path: '../.env' }); + +const app = admin.initializeApp({ + credential: admin.credential.cert(serviceAccount as any), +}); +process.env.FIREBASE_CONFIG = JSON.stringify({ projectId: serviceAccount.project_id }); + +const execute = async () => { + const db = getFirestore(app); + const files = globSync(`./dbUpgrades/**/*.ts`); + for (const file of files.sort()) { + const content = fs.readFileSync(file); + const hash = crypto.createHash('sha1').update(content).digest('hex'); + + const docRef = db.doc(`${COL.DB_ROLL_FILES}/${hash}`); + const doc = await docRef.get(); + if (doc.exists) { + console.warn(`${file} script was already ran`); + continue; + } + + console.log(`Running ${file}`); + const func = await import(pathToImportFileName(file)); + await func.roll(new FirebaseApp(app)); + await docRef.create({}); + } +}; + +const pathToImportFileName = (path: string) => './' + path.replace('.ts', ''); + +execute(); diff --git a/packages/database/scripts/dbUpgrades/1.0.63/creditHighestPayment.ts b/packages/database/scripts/dbUpgrades/1.0.63/creditHighestPayment.ts new file mode 100644 index 0000000000..ebd6a5be4a --- /dev/null +++ b/packages/database/scripts/dbUpgrades/1.0.63/creditHighestPayment.ts @@ -0,0 +1,58 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { + COL, + Timestamp, + Transaction, + TransactionPayloadType, + TransactionType, +} from '@build-5/interfaces'; +import { FirebaseApp } from '../../../src/app/app'; +import { Firestore } from '../../../src/firestore/firestore'; + +export const creditHighestPayment = async (app: FirebaseApp) => { + const db = new Firestore(app); + + if (app.getName() !== 'soonaverse') { + console.log('Not prod env'); + return; + } + + const paymentUid = '0xe50e40db6c583e89733fd1b084e30e1d7b878755'; + const batch = db.batch(); + + const paymentDocRef = db.doc(`${COL.TRANSACTION}/${paymentUid}`); + const payment = await paymentDocRef.get(); + + batch.update(paymentDocRef, { 'payload.invalidPayment': true }); + + // was generated randomly elswhere so getRandomEthAddress is not needed here, + const creditUid = '0x3c368f6d447e5b703fd5b2d3a9d276809d03affe'; + const credit: Transaction = { + type: TransactionType.CREDIT, + uid: creditUid, + space: payment.space, + member: payment.member, + createdOn: Timestamp.now(), + network: payment.network, + payload: { + type: TransactionPayloadType.DATA_NO_LONGER_VALID, + amount: payment.payload.amount, + sourceAddress: payment.payload.targetAddress, + targetAddress: payment.payload.sourceAddress, + sourceTransaction: [payment.uid], + nft: payment.payload.nft || null, + reconciled: true, + void: false, + collection: payment.payload.collection || null, + invalidPayment: true, + }, + ignoreWallet: false, + }; + const creditDocRef = db.doc(`${COL.TRANSACTION}/${credit.uid}`); + batch.create(creditDocRef, credit); + + await batch.commit(); +}; + +export const roll = creditHighestPayment; diff --git a/packages/functions/src/services/payment/tangle-service/nft/nft-set-for-sale.service.ts b/packages/functions/src/services/payment/tangle-service/nft/nft-set-for-sale.service.ts index babb01e3b8..52faabc92c 100644 --- a/packages/functions/src/services/payment/tangle-service/nft/nft-set-for-sale.service.ts +++ b/packages/functions/src/services/payment/tangle-service/nft/nft-set-for-sale.service.ts @@ -42,6 +42,10 @@ export const getNftSetForSaleParams = async (params: NftSetForSaleRequest, owner throw invalidArgument(WenError.nft_does_not_exists); } + if (nft.auctionFrom && dayjs(nft.auctionFrom.toDate()).isBefore(dayjs())) { + throw invalidArgument(WenError.nft_auction_already_in_progress); + } + if (nft.setAsAvatar) { throw invalidArgument(WenError.nft_set_as_avatar); } @@ -68,10 +72,6 @@ export const getNftSetForSaleParams = async (params: NftSetForSaleRequest, owner params.auctionFrom = dateToTimestamp(params.auctionFrom, true).toDate(); } - if (params.auctionFrom && nft.auctionFrom && dayjs(nft.auctionFrom.toDate()).isBefore(dayjs())) { - throw invalidArgument(WenError.nft_auction_already_in_progress); - } - const collectionDocRef = build5Db().doc(`${COL.COLLECTION}/${nft.collection}`); const collection = await collectionDocRef.get(); if (![CollectionStatus.PRE_MINTED, CollectionStatus.MINTED].includes(collection?.status!)) { diff --git a/packages/functions/test-tangle/nft-set-for-sale/Helper.ts b/packages/functions/test-tangle/nft-set-for-sale/Helper.ts index 300fc1bdd8..e509665649 100644 --- a/packages/functions/test-tangle/nft-set-for-sale/Helper.ts +++ b/packages/functions/test-tangle/nft-set-for-sale/Helper.ts @@ -121,11 +121,11 @@ export class Helper { media: MEDIA, }); - public dummyAuctionData = (uid: string) => ({ + public dummyAuctionData = (uid: string, availableFrom?: Date, auctionFrom?: Date) => ({ nft: uid, price: MIN_IOTA_AMOUNT, - availableFrom: dayjs().toDate(), - auctionFrom: dayjs().toDate(), + availableFrom: availableFrom || dayjs().toDate(), + auctionFrom: auctionFrom || dayjs().toDate(), auctionFloorPrice: MIN_IOTA_AMOUNT, auctionLength: 60000 * 4, access: NftAccess.OPEN, diff --git a/packages/functions/test-tangle/nft-set-for-sale/nft-set-for-sale_3.spec.ts b/packages/functions/test-tangle/nft-set-for-sale/nft-set-for-sale_3.spec.ts new file mode 100644 index 0000000000..ae06d01ca5 --- /dev/null +++ b/packages/functions/test-tangle/nft-set-for-sale/nft-set-for-sale_3.spec.ts @@ -0,0 +1,119 @@ +import { + COL, + MIN_IOTA_AMOUNT, + Network, + Nft, + NftAvailable, + NftSetForSaleTangleRequest, + TangleRequestType, + Transaction, + TransactionType, + WenError, +} from '@build-5/interfaces'; +import dayjs from 'dayjs'; +import { build5Db } from '../../src/firebase/firestore/build5Db'; +import { MnemonicService } from '../../src/services/wallet/mnemonic'; +import { wait } from '../../test/controls/common'; +import { getTangleOrder } from '../common'; +import { requestFundsFromFaucet } from '../faucet'; +import { Helper } from './Helper'; + +describe('Nft set for acution OTR', () => { + const helper = new Helper(); + let tangleOrder: Transaction; + + beforeAll(async () => { + await helper.beforeAll(); + tangleOrder = await getTangleOrder(); + }); + + beforeEach(async () => { + await helper.beforeEach(); + }); + + it('Should throw, nft auction already in progress', async () => { + await helper.createAndOrderNft(); + + await requestFundsFromFaucet(Network.RMS, helper.guardianAddress.bech32, 5 * MIN_IOTA_AMOUNT); + + let auctionData = helper.dummyAuctionData( + helper.nft.uid, + dayjs().add(1, 'h').toDate(), + dayjs().add(1, 'h').toDate(), + ); + await helper.walletService!.send( + helper.guardianAddress, + tangleOrder.payload.targetAddress!, + MIN_IOTA_AMOUNT, + { + customMetadata: { + request: { + requestType: TangleRequestType.NFT_SET_FOR_SALE, + ...auctionData, + } as NftSetForSaleTangleRequest, + }, + }, + ); + await MnemonicService.store(helper.guardianAddress.bech32, helper.guardianAddress.mnemonic); + + const nftDocRef = build5Db().doc(`${COL.NFT}/${helper.nft.uid}`); + await wait(async () => { + helper.nft = (await nftDocRef.get())!; + return helper.nft.available === NftAvailable.AUCTION_AND_SALE; + }); + + auctionData = helper.dummyAuctionData(helper.nft.uid); + await helper.walletService!.send( + helper.guardianAddress, + tangleOrder.payload.targetAddress!, + MIN_IOTA_AMOUNT, + { + customMetadata: { + request: { + requestType: TangleRequestType.NFT_SET_FOR_SALE, + ...auctionData, + } as NftSetForSaleTangleRequest, + }, + }, + ); + await MnemonicService.store(helper.guardianAddress.bech32, helper.guardianAddress.mnemonic); + + const credit = build5Db() + .collection(COL.TRANSACTION) + .where('member', '==', helper.guardian) + .where('type', '==', TransactionType.CREDIT_TANGLE_REQUEST); + await wait(async () => { + const snap = await credit.get(); + return snap.length === 2; + }); + const succeses = (await credit.get()).filter( + (t) => t.payload.response?.status === 'success', + ); + expect(succeses.length).toBe(2); + + auctionData = helper.dummyAuctionData(helper.nft.uid); + await helper.walletService!.send( + helper.guardianAddress, + tangleOrder.payload.targetAddress!, + MIN_IOTA_AMOUNT, + { + customMetadata: { + request: { + requestType: TangleRequestType.NFT_SET_FOR_SALE, + ...auctionData, + } as NftSetForSaleTangleRequest, + }, + }, + ); + + await wait(async () => { + const snap = await credit.get(); + return snap.length === 3; + }); + const snap = await credit.get(); + const creditTransction = snap.find( + (t) => t.payload.response?.code === WenError.nft_auction_already_in_progress.code, + ); + expect(creditTransction).toBeDefined(); + }); +});