From 02a0d97881df3cfd608b72fefcf9173143b95f84 Mon Sep 17 00:00:00 2001 From: calmcat2 <22280915+calmcat2@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:21:10 +0000 Subject: [PATCH] ci(workflow): add ci-cd-pr-web-wallet.yml, remove github-ci.yml --- .github/workflows/ci-cd-pr-web-wallet.yml | 51 +++++++++++++++++++++++ .github/workflows/github-ci.yml | 46 -------------------- 2 files changed, 51 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/ci-cd-pr-web-wallet.yml delete mode 100644 .github/workflows/github-ci.yml diff --git a/.github/workflows/ci-cd-pr-web-wallet.yml b/.github/workflows/ci-cd-pr-web-wallet.yml new file mode 100644 index 00000000..3baabcd6 --- /dev/null +++ b/.github/workflows/ci-cd-pr-web-wallet.yml @@ -0,0 +1,51 @@ +# This workflow triggers on pull requests that modify files in the web module (i.e., apps/web/**) +# It runs component and end-to-end (E2E) tests to validate changes. + +name: PR CI for Web module + +on: + pull_request: + paths: + - "apps/web/**" + - "!apps/web/**/*.md" + workflow_dispatch: + +jobs: + component-e2e-tests: + runs-on: ubuntu-latest + env: + NODE_TLS_REJECT_UNAUTHORIZED: "0" + NEXT_PUBLIC_WALLET_APP_API: ${{ vars.NEXT_PUBLIC_WALLET_APP_API }} + NEXT_PUBLIC_ENV: ${{ vars.NEXT_PUBLIC_ENV }} + NEXT_PUBLIC_API_TIMEOUT: ${{ vars.NEXT_PUBLIC_API_TIMEOUT }} + NEXT_PUBLIC_API_RETRIES: ${{ vars.NEXT_PUBLIC_API_RETRIES }} + NEXT_PUBLIC_BASE_URL: ${{ vars.NEXT_PUBLIC_BASE_URL }} + CORS_ORIGINS_DEV: ${{ vars.CORS_ORIGINS_DEV }} + PRIVATE_KEYCLOAK_REALM: ${{ secrets.PRIVATE_KEYCLOAK_REALM }} + PRIVATE_KEYCLOAK_BASE_URL: ${{ secrets.PRIVATE_KEYCLOAK_BASE_URL }} + PRIVATE_KEYCLOAK_CLIENT_SECRET: ${{ secrets.PRIVATE_KEYCLOAK_CLIENT_SECRET }} + DATABASE_URL: ${{ secrets.DATABASE_URL }} + PRIVATE_KEYCLOAK_CLIENT_ID: ${{ secrets.PRIVATE_KEYCLOAK_CLIENT_ID }} + PRIVATE_WALLET_API_KEY: ${{ secrets.PRIVATE_WALLET_API_KEY }} + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: "20.x" + + - name: Enable Corepack + run: corepack enable + + - name: Install dependencies + run: yarn install --immutable + + - name: Start user service in the background + run: yarn user:dev &>/dev/null & npx wait-on tcp:8080 --timeout 30000 + + - name: Run component test + uses: cypress-io/github-action@v6 + with: + command: yarn cypress-component-test && yarn cypress-e2e-headless-test diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml deleted file mode 100644 index 70f4fcdb..00000000 --- a/.github/workflows/github-ci.yml +++ /dev/null @@ -1,46 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Wallet App CI for New Pull Requests - -on: - pull_request: - paths-ignore: - - "**.md" - branches: - - "*" - -jobs: - install: - name: Install dependencies - runs-on: ubuntu-latest - steps: - # https://github.com/actions/checkout - - name: Checkout ๐Ÿ›Ž๏ธ - uses: actions/checkout@v4 - - - name: Enable Corepack - run: corepack enable - - # only install dependencies - # https://github.com/cypress-io/github-action - - name: Install ๐Ÿ“ฆ - uses: cypress-io/github-action@v6 - with: - runTests: false - - cypress-tests: - name: Run cypress unit tests - needs: install - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Enable Corepack - run: corepack enable - - - name: Run Component tests ๐Ÿงช - uses: cypress-io/github-action@v6 - with: - command: yarn run cypress-component-test