This commit is contained in:
Luca Palmieri 2020-12-05 18:53:24 +00:00
parent b528653dc5
commit 88f12d91f4

View file

@ -28,11 +28,6 @@ jobs:
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
@ -41,12 +36,10 @@ jobs:
toolchain: stable
override: true
- name: Migrate database
env:
SKIP_DOCKER: true
run: |
sudo apt-get install libpq-dev -y
cargo install --version=0.2.0 sqlx-cli --no-default-features --features postgres
./scripts/init_db.sh
SKIP_DOCKER=true ./scripts/init_db.sh
- uses: actions-rs/cargo@v1
with:
command: test
@ -72,7 +65,11 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
@ -98,7 +95,11 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
ports:
- 5432:5432
steps: