db-cache fixes

This commit is contained in:
zomars 2023-02-24 21:20:27 -07:00
parent 0991c54f36
commit 8d2587bc3a
5 changed files with 3 additions and 10 deletions

View File

@ -2,7 +2,8 @@ name: Cache database between jobs
description: "Cache or restore if necessary"
inputs:
DATABASE_URL:
required: true
required: false
default: postgresql://postgres:@localhost:5432/calendso
path:
required: false
default: "backups/backup.sql"
@ -17,7 +18,7 @@ runs:
with:
path: ${{ inputs.path }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ github.sha }}
restore-keys: |
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ github.sha }}
- name: Postgres Dump Backup
if: steps.cache-db.outputs.cache-hit != 'true'

View File

@ -23,8 +23,6 @@ jobs:
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
with:
DATABASE_URL: ${{ env.DATABASE_URL }}
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-build
- name: Run Tests

View File

@ -22,8 +22,6 @@ jobs:
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
with:
DATABASE_URL: ${{ env.DATABASE_URL }}
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-build
- name: Run Tests

View File

@ -20,8 +20,6 @@ jobs:
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
with:
DATABASE_URL: ${{ env.DATABASE_URL }}
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-build
- run: yarn test-e2e

View File

@ -22,8 +22,6 @@ jobs:
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-db
id: cache-db
with:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
- uses: ./.github/actions/cache-build
id: cache-build
- run: yarn db-seed