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 803af5f commit 07833f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: 'Setup Node Env, Get & Cache Dependencies'
description: 'Setup Node Env, Get & Cache Dependencies(via yarn) for faster builds'
on:
workflow_call:
secrets:
DATABASE_URL:
required: true

runs:
using: 'composite'
steps:
Expand All @@ -17,3 +23,7 @@ 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
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

0 comments on commit 07833f2

Please sign in to comment.