feat(ligretto): unify card interactions and drag and drop #337
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: 'Ligretto pull request' | |
| on: | |
| pull_request: | |
| branches: [master] | |
| paths: | |
| - 'apps/ligretto-**' | |
| - 'packages/ligretto-shared/**' | |
| - 'packages/auth-front/**' | |
| - 'packages/cas-services/**' | |
| - 'packages/ui/**' | |
| - '.docker/Ligretto-**' | |
| - .github/workflows/ligretto-pr.yml | |
| - '.env*' | |
| - 'pnpm-lock.yaml' | |
| - package.json | |
| - pnpm-workspace.yaml | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=4096 | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - uses: ./.github/actions/prepare-nodejs | |
| name: Prepare Node.js | |
| - name: Build shared | |
| run: pnpm ligretto-shared:build | |
| - name: Run tests | |
| run: pnpm ligretto:test:ci | |
| typecheck: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - uses: ./.github/actions/prepare-nodejs | |
| name: Prepare Node.js | |
| - name: TS check | |
| run: pnpm ligretto:ts-check:ci | |
| # Same Dockerfiles the release workflow pushes, built without pushing: the image build runs | |
| # `pnpm install` and the production app build, neither of which the other PR jobs cover. | |
| core-backend-image: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| with: | |
| driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10485760 | |
| - name: Build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| push: false | |
| context: '.' | |
| file: '.docker/Ligretto-core-backend_Dockerfile' | |
| cache-from: | | |
| type=gha,scope=ligretto-core-backend-pr | |
| type=gha,scope=${{ github.base_ref }}-ligretto-core-backend | |
| cache-to: type=gha,mode=max,scope=ligretto-core-backend-pr | |
| gameplay-backend-image: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| with: | |
| driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10485760 | |
| - name: Build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| push: false | |
| context: '.' | |
| file: '.docker/Ligretto-gameplay-backend_Dockerfile' | |
| cache-from: | | |
| type=gha,scope=ligretto-gameplay-backend-pr | |
| type=gha,scope=${{ github.base_ref }}-ligretto-gameplay-backend | |
| cache-to: type=gha,mode=max,scope=ligretto-gameplay-backend-pr | |
| e2e: | |
| env: | |
| LIGRETTO_CORE_APP_KEY: nwpdmmnko5ylXZt_5CMnofXYUVl9Ppte | |
| LIGRETTO_CORE_APP_NAME: ligretto-core | |
| LIGRETTO_CORE_DB_CONNECTION: pg | |
| LIGRETTO_CORE_PG_HOST: localhost | |
| LIGRETTO_CORE_PG_PORT: 5433 | |
| LIGRETTO_CORE_PG_USER: ligretto-core-user | |
| LIGRETTO_CORE_PG_PASSWORD: ligretto_pg_password | |
| LIGRETTO_CORE_PG_DB_NAME: ligretto-core | |
| CAS_PARTNER_ID: 685706c5ef9a1d005c9ef9b4 | |
| CAS_URL: https://cas.mems.fun | |
| LIGRETTO_CORE_CAS_PUBLIC_KEY_PATH: ../../key.pem | |
| LOG_LEVEL: debug | |
| services: | |
| postgres: | |
| image: postgres:13.4 | |
| ports: | |
| - 5433:5432 | |
| env: | |
| POSTGRES_USER: ligretto-core-user | |
| POSTGRES_PASSWORD: ligretto_pg_password | |
| POSTGRES_DB: ligretto-core | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - uses: ./.github/actions/prepare-nodejs | |
| name: Prepare Node.js | |
| - name: Install Playwright Browsers | |
| run: pnpm --filter=@memebattle/ligretto-frontend exec playwright install --with-deps chromium | |
| - name: Migrate database | |
| run: pnpm ligretto:core-backend:migrate | |
| - name: Start core backend | |
| run: pnpm ligretto:core-backend:start:dev > /tmp/core-backend.log 2>&1 & | |
| - name: Check core backend app | |
| run: pnpm dlx wait-on --timeout 60000 http-get://127.0.0.1:3333/health | |
| - name: Start gameplay backend | |
| run: pnpm ligretto:gameplay-backend:start:dev > /tmp/gameplay-backend.log 2>&1 & | |
| - name: Start frontend | |
| run: pnpm ligretto:front:start:dev > /tmp/frontend.log 2>&1 & | |
| - name: Check frontend app | |
| run: pnpm dlx wait-on -c ./apps/ligretto-frontend/waitOnConfig.json --timeout 60000 http-get://127.0.0.1:5173 | |
| - name: Run playwright tests | |
| run: pnpm --filter=@memebattle/ligretto-frontend e2e:start | |
| - uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: e2e-report | |
| path: | | |
| apps/ligretto-frontend/playwright-report/ | |
| apps/ligretto-frontend/test-results/ | |
| /tmp/core-backend.log | |
| /tmp/gameplay-backend.log | |
| /tmp/frontend.log | |
| retention-days: 7 |