chore: credit E2E crackdown #1675
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: Pull Request | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
defaults: | |
run: | |
working-directory: packages/client | |
env: | |
BUCKET_WEB: reactive-trader-web-builds | |
BUCKET_OPENFIN: reactive-trader-openfin-builds | |
ENVIRONMENT: env | |
jobs: | |
build: | |
name: Build & deploy | |
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: "Authenticate to Google Cloud" | |
uses: "google-github-actions/auth@v2" | |
with: | |
credentials_json: "${{ secrets.GCLOUD_SERVICE_ACCOUNT_JSON }}" | |
- name: Set up GCloud | |
uses: google-github-actions/setup-gcloud@v2 | |
with: | |
project_id: ${{ secrets.GOOGLE_PROJECT_ID }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Verify Quality (type checking, linting, format checking, tests) | |
run: npm run verify | |
- name: Build (web) | |
env: | |
DOMAIN: https://web.env.reactivetrader.com | |
URL_PATH: /pull/${{ github.event.number }} | |
VITE_BUILD_VERSION: ${{ github.sha }} | |
run: | | |
npm run build | |
- name: Deploy (web) | |
run: | | |
gsutil -m \ | |
-h "Cache-Control: no-cache" \ | |
rsync -d -r dist \ | |
gs://$BUCKET_WEB/pull/${{ github.event.number }} | |
- name: E2E Web - Credit only | |
env: | |
E2E_RTC_WEB_ROOT_URL: https://web.env.reactivetrader.com/pull/${{ github.event.number }} | |
run: npx playwright test --project=web credit.spec.ts | |
- name: Artifact Upload | |
uses: actions/upload-artifact@v4 | |
# if: failure() | |
with: | |
name: playwright-report-of-credit | |
path: packages/client/playwright-report/ | |
retention-days: 7 |