[#370] added pressing Enter to create a room #498
Workflow file for this run
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: CI-pull-requests | |
on: | |
pull_request: | |
branches: [ master ] | |
merge_group: | |
types: [ checks_requested ] | |
env: | |
NODE_OPTIONS: --max-old-space-size=4096 | |
jobs: | |
lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.14' | |
cache: 'yarn' | |
- name: Install yarn | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn | |
- name: Lint code | |
run: yarn lint | |
tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.14' | |
cache: 'yarn' | |
- name: Install yarn | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn | |
- name: Build shared | |
run: yarn ligretto-shared:build | |
- name: Run tests | |
run: yarn test:ci | |
- uses: jwalton/gh-find-current-pr@v1 | |
id: findPr | |
- name: Collect coverage from ligretto-gameplay-backend | |
uses: ArtiomTr/jest-coverage-report-action@v2 | |
with: | |
prnumber: ${{ steps.findPr.outputs.number }} | |
skip-step: all | |
working-directory: apps/ligretto-gameplay-backend | |
tsc: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.14' | |
cache: 'yarn' | |
- name: Install yarn | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn | |
- name: TS check | |
run: yarn ts-check | |
e2e: | |
env: | |
NODE_ENV: test | |
APP_KEY: nwpdmmnko5ylXZt_5CMnofXYUVl9Ppte | |
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-20.04 | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.14' | |
cache: 'yarn' | |
- name: Install yarn | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn | |
- name: Install Playwright Browsers | |
run: yarn dlx [email protected] install --with-deps chromium | |
- name: Migrate database | |
run: yarn ligretto:core-backend:migrate | |
- name: Start core backend | |
run: yarn ligretto:core-backend:start:dev & | |
- name: Check core backend app | |
run: yarn dlx wait-on --timeout 60000 http-get://127.0.0.1:3333/health | |
- name: Start gameplay backend | |
run: yarn ligretto:gameplay-backend:start:dev & | |
- name: Start frontend | |
run: yarn ligretto:front:start:dev & | |
- name: Check frontend app | |
run: yarn dlx wait-on -c ./apps/ligretto-frontend/waitOnConfig.json --timeout 60000 http-get://127.0.0.1:5173 | |
- name: Run playwright tests | |
run: yarn e2e:start |