Skip to content

Commit

Permalink
Merge pull request #2574 from build-5/impr/otr-nft-par-purchase
Browse files Browse the repository at this point in the history
Allow parallel nft purchase with OTR
  • Loading branch information
adamunchained authored Sep 8, 2023
2 parents c1c10ff + ff753b3 commit 2cf0892
Show file tree
Hide file tree
Showing 6 changed files with 387 additions and 97 deletions.
120 changes: 78 additions & 42 deletions .github/workflows/functions_tangle-online-unit-tests_emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ jobs:
firebase emulators:exec "
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_1.spec.ts
npm run test-tangle-online:ci -- --findRelatedTests test-tangle/minted-nft-trading/minted-nft-trading_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
Expand Down Expand Up @@ -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/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/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_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
Expand Down Expand Up @@ -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/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_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_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
Expand Down Expand Up @@ -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/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/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/collection-minting/collection-minting_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
Expand Down Expand Up @@ -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/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_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_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
Expand Down Expand Up @@ -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/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_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_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
Expand Down Expand Up @@ -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_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_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_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
Expand Down Expand Up @@ -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/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/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/base-token-trading/base-token-trading_6.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 @@ -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/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_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_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
Expand Down Expand Up @@ -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/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_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_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
Expand Down Expand Up @@ -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/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/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/award-tangle/award-tangle_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
Expand Down Expand Up @@ -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/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_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_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
Expand Down Expand Up @@ -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/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-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/award_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
Expand Down Expand Up @@ -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/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_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_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
Expand Down Expand Up @@ -1867,14 +1867,50 @@ 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_2.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_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
if: ${{ failure() }}
with:
name: firestore-data-test-tangle-online-chunk_49
path: ./packages/functions/firestore-data/
retention-days: 1
chunk_50:
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_10.spec.ts &&
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_49
name: firestore-data-test-tangle-online-chunk_50
path: ./packages/functions/firestore-data/
retention-days: 1
Loading

0 comments on commit 2cf0892

Please sign in to comment.