Skip to content

Commit

Permalink
fix: db name for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Jul 1, 2023
1 parent 80be9f2 commit b3329ce
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
ports:
- 5432:5432
env:
DATABASE_URL: postgresql://postgres:password@localhost:5432/3la-test
DATABASE_URL: postgresql://postgres:password@localhost:5432/postgres

steps:
- name: Checkout
Expand Down Expand Up @@ -69,20 +69,22 @@ jobs:
override: true
- name: Setup database
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/3la-test
run: cargo install sqlx-cli --no-default-features --features native-tls,postgres && cargo sqlx prepare --check
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
run: cargo install sqlx-cli --no-default-features --features native-tls,postgres

- name: Database create
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/3la-test
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
run: sqlx database create

- name: Database migrate
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/3la-test
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
run: sqlx migrate run

- uses: actions-rs/cargo@v1
env:
SQLX_OFFLINE: true
with:
command: test

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gen-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ jobs:
- name: Setup Database
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/3la-test
run: cargo install sqlx-cli --no-default-features --features native-tls,postgres && cargo sqlx prepare --check
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
run: cargo install sqlx-cli --no-default-features --features native-tls,postgres

- name: Database create
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/3la-test
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
run: sqlx database create

- name: Database migrate
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/3la-test
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
run: sqlx migrate run

- name: Build release binary
run: |
export DATABASE_URL=postgres://postgres:password@localhost:5432/3la-test
export DATABASE_URL=postgres://postgres:password@localhost:5432/postgres
cargo build --release
- name: Upload Ubuntu binary
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ WORKDIR /graphcast-3la

RUN sh install-golang.sh
ARG SQLX_OFFLINE=true
ARG DATABASE_URL=postgresql://postgres:password@localhost:5432/3la-test
RUN echo "DATABASE_URL=postgresql://postgres:password@localhost:5432/3la-test" > .env
ARG DATABASE_URL=postgresql://postgres:password@localhost:5432/postgres
RUN echo "DATABASE_URL=postgresql://postgres:password@localhost:5432/postgres" > .env
RUN ls
ENV PATH=$PATH:/usr/local/go/bin

Expand Down

0 comments on commit b3329ce

Please sign in to comment.