Skip to content

Add _allBillingReceiptsSum #13714

Add _allBillingReceiptsSum

Add _allBillingReceiptsSum #13714

name: RUN CYPRESS TESTS
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x ]
database: [ "postgresql://postgres:[email protected]/main" ]
steps:
- name: Checkout code with submodules
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
ssh-key: ${{ secrets.SSH_DOCK_SERVER_PRIVATE_KEY }}
- name: Docker compose up databases
run: |
cp .env.example .env
docker-compose up -d postgresdb redis
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: install packages
run: |
npm i -g turbo
yarn install --immutable
pip3 install django
pip3 install psycopg2-binary
- name: run build
run: |
set -x
echo "# Build time .env config!" > .env
echo "COOKIE_SECRET=undefined" >> .env
echo "DATABASE_URL=undefined" >> .env
echo "REDIS_URL=undefined" >> .env
echo "NODE_ENV=production" >> .env
yarn workspace @app/condo build:deps
yarn workspace @app/condo build
- name: start server in production mode
run: |
set -x
cp .env.example .env
echo 'NODE_ENV=test' >> .env
echo 'DATABASE_URL=postgresql://postgres:[email protected]/main' >> .env
echo 'REDIS_URL=redis://127.0.0.1:6379' >> .env
echo 'COOKIE_SECRET=random' >> .env
export NODE_ENV=development
export NOTIFICATION__SEND_ALL_MESSAGES_TO_CONSOLE=true
export NOTIFICATION__DISABLE_LOGGING=true
export WORKER_CONCURRENCY=50
export APOLLO_BATCHING_ENABLED=true
yarn workspace @app/condo migrate
yarn workspace @app/condo node ./bin/generate-initial-data.js
echo 'ADDRESS_SERVICE_CLIENT_MODE=fake' >> .env
echo 'DISABLE_CAPTCHA_CHECK=true' >> .env
yarn workspace @app/condo start &
bash ./.github/workflows/waitForLocalhostApiReady.sh
- name: run cypress tests
run: |
yarn workspace @app/condo cypress run --record --key ${{ secrets.CYPRESS_RECORD_KEY }} -b chrome -C ./cypress/cypress.config.ts
kill $(jobs -p) || echo 'background worker and dev server is already killed!'
killall node || echo 'no node processes'
env:
DATABASE_URL: ${{ matrix.database }}
NODE_ENV: development
DISABLE_LOGGING: true
- name: Upload screenshots artifact
uses: actions/upload-artifact@v3
if: failure()
with:
name: screenshots
path: |
./apps/condo/cypress/screenshots
retention-days: 2