Release 2.2 #1526
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Functions | Emulated Unit Tests | |
on: | |
pull_request: | |
paths: | |
- packages/functions/** | |
jobs: | |
npm-install: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
node_modules | |
packages/functions/node_modules | |
packages/interfaces/node_modules | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }} | |
- name: Install Dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm run build:functions | |
chunk_0: | |
needs: npm-install | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.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:ci -- --forceExit --findRelatedTests ./test/auth.spec.ts && | |
npm run test:ci -- --forceExit --findRelatedTests ./test/auth/legacy.auth.spec.ts && | |
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/address.spec.ts && | |
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/auction/auction.bid.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.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-chunk_0 | |
path: ./packages/functions/firestore-data/ | |
retention-days: 1 | |
chunk_1: | |
needs: npm-install | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.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:ci -- --forceExit --findRelatedTests ./test/controls/nft/nft.bidding.extends.spec.ts && | |
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/nft/nft.bidding.finalize.spec.ts && | |
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/nft/nft.bidding.spec.ts && | |
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/nft/nft.set.for.sale.spec.ts && | |
npm run test:ci -- --forceExit --findRelatedTests ./test/controls/order.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 | |
" --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-chunk_1 | |
path: ./packages/functions/firestore-data/ | |
retention-days: 1 | |
chunk_2: | |
needs: npm-install | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.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: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 && | |
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 | |
" --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-chunk_2 | |
path: ./packages/functions/firestore-data/ | |
retention-days: 1 | |
chunk_3: | |
needs: npm-install | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.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: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 && | |
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 | |
" --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-chunk_3 | |
path: ./packages/functions/firestore-data/ | |
retention-days: 1 | |
chunk_4: | |
needs: npm-install | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.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: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 && | |
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 | |
" --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-chunk_4 | |
path: ./packages/functions/firestore-data/ | |
retention-days: 1 | |
chunk_5: | |
needs: npm-install | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.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: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 && | |
npm run test:ci -- --forceExit --findRelatedTests ./test/naming.spec.ts && | |
npm run test:ci -- --forceExit --findRelatedTests ./test/stake/delete.stake.reward.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-chunk_5 | |
path: ./packages/functions/firestore-data/ | |
retention-days: 1 | |
chunk_6: | |
needs: npm-install | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.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: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 | |
if: ${{ failure() }} | |
with: | |
name: firestore-data-test-chunk_6 | |
path: ./packages/functions/firestore-data/ | |
retention-days: 1 |