From d32772981a81aab108cd16ec4013e7ac4ffd818b Mon Sep 17 00:00:00 2001 From: Alan Greasley Date: Wed, 27 Nov 2024 15:04:20 +0000 Subject: [PATCH] chore: ci limits on building finsemble, and clean up --- .github/workflows/branch.yml | 17 +++++++++++++ .github/workflows/e2e-full.yml | 14 ----------- .github/workflows/pull-fork.yml | 42 --------------------------------- .github/workflows/pull.yml | 22 +++-------------- .github/workflows/tag.yml | 7 ------ 5 files changed, 20 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/pull-fork.yml diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index ac966bff9..fcbc8c7c7 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -51,9 +51,24 @@ jobs: with: project_id: ${{ secrets.GOOGLE_PROJECT_ID }} + - name: Restore cache + uses: actions/cache/restore@v4 + id: cache-npm + with: + path: packages/client/node_modules + key: ${{ runner.OS }}-node-${{ hashFiles('packages/client/package-lock.json') }} + - name: Install dependencies + if: steps.cache-npm.outputs.cache-hit != 'true' run: npm ci + - name: Cache node modules + if: steps.cache-npm.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: packages/client/node_modules + key: ${{ runner.OS }}-node-${{ hashFiles('packages/client/package-lock.json') }} + - name: Verify Quality (type checking, linting, format checking, tests) run: npm run verify @@ -90,6 +105,7 @@ jobs: gs://$BUCKET_OPENFIN/branch/${{ steps.vars.outputs.BRANCH }} - name: Build (Finsemble) + if: ${{ steps.vars.outputs.ENVIRONMENT == 'dev' || steps.vars.outputs.ENVIRONMENT == 'uat' }} env: DOMAIN: https://finsemble.${{ steps.vars.outputs.ENVIRONMENT }}.reactivetrader.com URL_PATH: ${{ steps.vars.outputs.URL_SUFFIX }} @@ -98,6 +114,7 @@ jobs: run: npm run finsemble:build - name: Deploy (Finsemble) + if: ${{ steps.vars.outputs.ENVIRONMENT == 'dev' || steps.vars.outputs.ENVIRONMENT == 'uat' }} run: | gsutil -m \ -h "Cache-Control: no-cache" \ diff --git a/.github/workflows/e2e-full.yml b/.github/workflows/e2e-full.yml index ed23bd69e..ce4f71d85 100644 --- a/.github/workflows/e2e-full.yml +++ b/.github/workflows/e2e-full.yml @@ -55,17 +55,3 @@ jobs: name: playwright-report-uat path: packages/client/playwright-report/ retention-days: 7 - - - name: Test Prod - env: - E2E_RTC_WEB_ROOT_URL: https://web.prod.reactivetrader.com - run: npx playwright test --project=web credit.spec.ts - continue-on-error: true - - - name: Artifact Upload - uses: actions/upload-artifact@v4 - if: failure() - with: - name: playwright-report-prod - path: packages/client/playwright-report/ - retention-days: 7 diff --git a/.github/workflows/pull-fork.yml b/.github/workflows/pull-fork.yml deleted file mode 100644 index bd7944181..000000000 --- a/.github/workflows/pull-fork.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Fork Pull Request - -on: - pull_request: - types: - - opened - - synchronize - -defaults: - run: - working-directory: packages/client - -jobs: - build: - name: Build - - runs-on: ubuntu-20.04 - - if: ${{ github.event.pull_request.head.repo.fork }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set Node version - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Install dependencies - run: npm ci - - - name: Verify Quality (type checking, linting, format checking, tests) - run: npm run verify - - - name: Build (web) - run: | - npm run build - npm run storybook:build - - - name: Build (OpenFin) - run: npm run openfin:build diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 61f037c5d..46c5c337d 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -15,7 +15,6 @@ defaults: env: BUCKET_WEB: reactive-trader-web-builds BUCKET_OPENFIN: reactive-trader-openfin-builds - BUCKET_FINSEMBLE: reactive-trader-finsemble-builds ENVIRONMENT: env jobs: @@ -80,20 +79,6 @@ jobs: rsync -d -r dist \ gs://$BUCKET_OPENFIN/pull/${{ github.event.number }} - - name: Build (Finsemble) - env: - DOMAIN: https://finsemble.env.reactivetrader.com - URL_PATH: /pull/${{ github.event.number }} - VITE_BUILD_VERSION: ${{ github.sha }} - run: npm run finsemble:build - - - name: Deploy (Finsemble) - run: | - gsutil -m \ - -h "Cache-Control: no-cache" \ - rsync -d -r dist \ - gs://$BUCKET_FINSEMBLE/pull/${{ github.event.number }} - - name: Find comment uses: peter-evans/find-comment@v3 id: comment @@ -120,7 +105,6 @@ jobs: | OpenFin - Credit | fins://openfin.env.reactivetrader.com/pull/${{ github.event.number }}/config/rt-credit.json | | OpenFin - Launcher | fins://openfin.env.reactivetrader.com/pull/${{ github.event.number }}/config/launcher.json | | OpenFin - Workspace | fins://openfin.env.reactivetrader.com/pull/${{ github.event.number }}/workspace/config/workspace.json | - | Finsemble | https://finsemble.env.reactivetrader.com/pull/${{ github.event.number }} | ### Performance @@ -156,7 +140,7 @@ jobs: uses: actions/upload-artifact@v4 if: failure() with: - name: playwright-report + name: playwright-report-web path: packages/client/playwright-report/ retention-days: 7 @@ -191,7 +175,7 @@ jobs: uses: actions/upload-artifact@v4 if: failure() with: - name: playwright-report + name: playwright-report-of-fx path: packages/client/playwright-report/ retention-days: 7 @@ -226,6 +210,6 @@ jobs: uses: actions/upload-artifact@v4 if: failure() with: - name: playwright-report + name: playwright-report-of-credit path: packages/client/playwright-report/ retention-days: 7 diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 776bf932a..e65248c1f 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -83,13 +83,6 @@ jobs: rsync -d -r dist \ gs://$BUCKET_OPENFIN/tag/${{ steps.vars.outputs.TAG }} - - name: Deploy (Launcher) - run: | - gsutil -m \ - -h "Cache-Control: no-cache" \ - rsync -d -r dist \ - gs://$BUCKET_LAUNCHER/tag/${{ steps.vars.outputs.TAG }} - - name: Build (Finsemble) env: DOMAIN: https://finsemble.prod.reactivetrader.com