Revert "Consolitades setup step"

This reverts commit 5e8d1983cc.
pull/7738/head
zomars 2023-02-28 12:38:20 -07:00
parent 5e8d1983cc
commit 84517e6ddb
10 changed files with 17 additions and 58 deletions

View File

@ -1,49 +0,0 @@
name: "Set environment variables"
description: "Configures environment variables for a workflow"
inputs:
DATABASE_URL:
required: false
default: "postgresql://postgres:@localhost:5432/calendso"
path:
required: false
default: "backups/backup.sql"
runs:
using: "composite"
steps:
- name: Create env file
uses: actions/cache@v3
id: env-cache
with:
path: gh.env
key: env-cache-${{ hashFiles('gh.env') }}
restore-keys: env-cache-
- name: Set Environment Variables
uses: tw3lveparsecs/github-actions-setvars@latest
with:
envFilePath: gh.env
- name: Cache database
id: cache-db
uses: actions/cache@v3
env:
cache-name: cache-db
key-1: ${{ hashFiles('packages/prisma/schema.prisma', 'packages/prisma/migrations/**/**.sql', 'packages/prisma/*.ts') }}
key-2: ${{ github.event.pull_request.number || github.ref }}
with:
path: ${{ inputs.path }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ env.key-2 }}
- run: yarn db-seed
if: steps.cache-db.outputs.cache-hit != 'true'
shell: bash
- name: Postgres Dump Backup
if: steps.cache-db.outputs.cache-hit != 'true'
uses: tj-actions/pg-dump@v2.3
with:
database_url: ${{ inputs.DATABASE_URL }}
path: ${{ inputs.path }}
options: "-O"
- name: Postgres Backup Restore
if: steps.cache-db.outputs.cache-hit == 'true'
uses: tj-actions/pg-restore@v4.5
with:
database_url: ${{ inputs.DATABASE_URL }}
backup_file: ${{ inputs.path }}

View File

@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- uses: ./.github/actions/setup
- uses: ./.github/actions/yarn-install
- name: Show info
run: node -e "console.log(require('v8').getHeapStatistics())"

View File

@ -20,8 +20,10 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV
- uses: ./.github/actions/setup
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-build
- name: Run Tests
run: yarn test-e2e:app-store

View File

@ -19,8 +19,10 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV
- uses: ./.github/actions/setup
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-build
- name: Run Tests
run: yarn turbo run embed-tests-update-snapshots:ci --scope=@calcom/embed-react --concurrency=1

View File

@ -18,8 +18,10 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV
- uses: ./.github/actions/setup
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-build
- name: Run Tests
run: yarn test-e2e

View File

@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- uses: ./.github/actions/setup
- uses: ./.github/actions/yarn-install
- name: Save Code Linting Reports
run: yarn lint:report
continue-on-error: true

View File

@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- uses: ./.github/actions/setup
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/cache-build
- name: Analyze bundle
run: |

View File

@ -18,5 +18,7 @@ jobs:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-db
- uses: ./.github/actions/cache-build

View File

@ -12,6 +12,6 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- run: echo 'NODE_OPTIONS="--max_old_space_size=6144"' >> $GITHUB_ENV
- uses: ./.github/actions/setup
- uses: ./.github/actions/yarn-install
# Should be an 8GB machine as per https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
- run: yarn test

View File

@ -11,4 +11,4 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- uses: ./.github/actions/setup
- uses: ./.github/actions/yarn-install