Skip to content

Commit

Permalink
ci(actions/setup): run migration after install
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnigos committed Aug 19, 2024
1 parent e301505 commit 7acff0c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: 'Setup Node Env, Get & Cache Dependencies'
description: 'Setup Node Env, Get & Cache Dependencies(via yarn) for faster builds'
on:
workflow_call:
inputs:
DATABASE_URL:
required: true
type: string

runs:
using: 'composite'
steps:
Expand All @@ -17,3 +24,9 @@ runs:
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: bun install
shell: bash

- name: Run Migrations 🚀
run: bun run prisma:migrate
shell: bash
env:
DATABASE_URL: ${{ inputs.DATABASE_URL }}
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:

- name: Setup 👨🏻‍💻
uses: ./.github/actions/setup
with:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

- name: Build Application 🧱
run: bun run build
Expand All @@ -37,6 +39,8 @@ jobs:

- name: Setup 👨🏻‍💻
uses: ./.github/actions/setup
with:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

- name: Lint JS files 🐱
run: bun run lint
Expand All @@ -57,6 +61,8 @@ jobs:

- name: Setup 👨🏻‍💻
uses: ./.github/actions/setup
with:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

- name: Run unit tests 🧪
run: bun run test:coverage
Expand Down
2 changes: 1 addition & 1 deletion app/board/components/tasks/tasks-board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function TasksBoard({ showDone }: TasksBoard.Props) {
if (!destination) return

if (destination.droppableId === source.droppableId) {
reorderTasks(
await reorderTasks(
source.droppableId as BoardKeyWithoutOverdue,
source.index,
destination.index
Expand Down

0 comments on commit 7acff0c

Please sign in to comment.