chore: remove redundant sqlx command (#22)
* chore: remove redundant sqlx command * chore: remove docker_env.sh * chore: copy sqlx to docker * chore update
This commit is contained in:
parent
186ce6c5af
commit
7a09e1b860
|
|
@ -61,6 +61,4 @@ jobs:
|
|||
- name: Run tests
|
||||
run: |
|
||||
cargo install sqlx-cli --version=${{ env.SQLX_VERSION }} --features ${{ env.SQLX_FEATURES }} --no-default-features --locked
|
||||
cargo sqlx database create
|
||||
cargo sqlx migrate run
|
||||
cargo test
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ jobs:
|
|||
- name: Install Development Dependencies
|
||||
run: |
|
||||
cargo install sqlx-cli --version=${{ env.SQLX_VERSION }} --features ${{ env.SQLX_FEATURES }} --no-default-features --locked
|
||||
cargo sqlx database create
|
||||
cargo sqlx migrate run
|
||||
|
||||
- name: Check sqlx-data.json
|
||||
run: |
|
||||
|
|
@ -44,4 +42,4 @@ jobs:
|
|||
run: cargo fmt --check
|
||||
|
||||
- name: Clippy
|
||||
run: SQLX_OFFLINE=true cargo clippy -- -D warnings
|
||||
run: SQLX_OFFLINE=true cargo clippy -- -D warnings
|
||||
13
Makefile
13
Makefile
|
|
@ -1,18 +1,7 @@
|
|||
ROOT = "./build"
|
||||
SEMVER_VERSION=$(shell grep version Cargo.toml | awk -F"\"" '{print $$2}' | head -n 1)
|
||||
|
||||
.PHONY: prerequisite local_test
|
||||
|
||||
prerequisite:
|
||||
POSTGRES_PORT=5432 ${ROOT}/init_database.sh
|
||||
${ROOT}/init_redis.sh
|
||||
|
||||
appflowy_cloud_image:
|
||||
source $(ROOT)/docker_env.sh && docker-compose up -d appflowy_cloud
|
||||
|
||||
local_test:
|
||||
# 🔥 Must run init_database first
|
||||
SQLX_OFFLINE=true cargo test
|
||||
.PHONY: run test
|
||||
|
||||
run:
|
||||
${ROOT}/run_local_server.sh
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
export BACKEND_VERSION="v0.0.1"
|
||||
|
||||
export POSTGRES_USER=postgres
|
||||
export POSTGRES_PASSWORD=password
|
||||
export POSTGRES_PORT=5432
|
||||
export POSTGRES_HOST=postgres
|
||||
export POSTGRES_DB=appflowy
|
||||
|
||||
export DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
|
||||
|
|
@ -16,6 +16,4 @@ until PGPASSWORD="${DB_PASSWORD}" psql -h "${DB_HOST}" -U "${DB_USER}" -p "${DB_
|
|||
>&2 echo "Postgres is still unavailable - sleeping"
|
||||
sleep 1
|
||||
done
|
||||
sqlx database create
|
||||
sqlx migrate run
|
||||
cargo run
|
||||
|
|
|
|||
Loading…
Reference in New Issue