Skip to content

action migrate in dir #7

action migrate in dir

action migrate in dir #7

Workflow file for this run

name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install sqlx-cli
run: |
cargo install sqlx-cli --no-default-features --features postgres
- name: Migrate database
working-directory: rhombus
run: |
DATABASE_URL=postgres://postgres:postgres@localhost/postgres sqlx migrate run
- name: Build
run: |
cargo build