Merge pull request #301 from nanaabdul1172/Leaderboard #562
This file contains hidden or 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: CI - Build & Lint Check | |
| on: | |
| pull_request: | |
| branches: ["*"] | |
| push: | |
| branches: ["main", "develop"] | |
| jobs: | |
| build-and-lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Cache pnpm store | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local/share/pnpm/store | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run linter | |
| run: pnpm lint | |
| - name: Build project | |
| run: pnpm build | |
| env: | |
| NODE_ENV: production | |
| NEXT_PUBLIC_STELLAR_RPC_URL: ${{ secrets.NEXT_PUBLIC_STELLAR_RPC_URL || 'https://soroban-testnet.stellar.org' }} | |
| NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE: ${{ secrets.NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE || 'Test SDF Network ; September 2015' }} | |
| NEXT_PUBLIC_SMART_ACCOUNT_WASM_HASH: ${{ secrets.NEXT_PUBLIC_SMART_ACCOUNT_WASM_HASH || 'a12e8fa9621efd20315753bd4007d974390e31fbcb4a7ddc4dd0a0dec728bf2e' }} | |
| NEXT_PUBLIC_WEBAUTHN_VERIFIER_ADDRESS: ${{ secrets.NEXT_PUBLIC_WEBAUTHN_VERIFIER_ADDRESS || 'CBSHV66WG7UV6FQVUTB67P3DZUEJ2KJ5X6JKQH5MFRAAFNFJUAJVXJYV' }} | |
| NEXT_PUBLIC_NATIVE_TOKEN_CONTRACT: ${{ secrets.NEXT_PUBLIC_NATIVE_TOKEN_CONTRACT || 'CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC' }} | |
| test-e2e: | |
| runs-on: ubuntu-latest | |
| needs: build-and-lint | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Cache pnpm store | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local/share/pnpm/store | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build project | |
| run: pnpm build | |
| env: | |
| NODE_ENV: production | |
| NEXT_PUBLIC_STELLAR_RPC_URL: ${{ secrets.NEXT_PUBLIC_STELLAR_RPC_URL || 'https://soroban-testnet.stellar.org' }} | |
| NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE: ${{ secrets.NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE || 'Test SDF Network ; September 2015' }} | |
| NEXT_PUBLIC_SMART_ACCOUNT_WASM_HASH: ${{ secrets.NEXT_PUBLIC_SMART_ACCOUNT_WASM_HASH || 'a12e8fa9621efd20315753bd4007d974390e31fbcb4a7ddc4dd0a0dec728bf2e' }} | |
| NEXT_PUBLIC_WEBAUTHN_VERIFIER_ADDRESS: ${{ secrets.NEXT_PUBLIC_WEBAUTHN_VERIFIER_ADDRESS || 'CBSHV66WG7UV6FQVUTB67P3DZUEJ2KJ5X6JKQH5MFRAAFNFJUAJVXJYV' }} | |
| NEXT_PUBLIC_NATIVE_TOKEN_CONTRACT: ${{ secrets.NEXT_PUBLIC_NATIVE_TOKEN_CONTRACT || 'CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC' }} | |
| - name: Install Playwright Chromium | |
| run: pnpm exec playwright install chromium --with-deps | |
| - name: Run E2E tests | |
| run: pnpm run test:e2e | |
| env: | |
| CI: true | |
| NEXT_PUBLIC_GRAPHQL_URL: http://localhost:3000/api/graphql | |
| NEXT_PUBLIC_API_URL: http://localhost:3000 | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 |