mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Update ci.yml to allow Postgres testing
This commit is contained in:
parent
f0b7681cb3
commit
3fb4ee226a
2 changed files with 20 additions and 1 deletions
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
|
@ -8,7 +8,7 @@ on:
|
|||
name: Continuous integration
|
||||
|
||||
env:
|
||||
RUSTFLAGS: "--cfg CI_REDIS -Dwarnings"
|
||||
RUSTFLAGS: "--cfg CI_REDIS CI_POSTGRES -Dwarnings"
|
||||
RUSTDOCFLAGS: -Dwarnings
|
||||
RUST_BACKTRACE: short
|
||||
|
||||
|
@ -74,6 +74,21 @@ jobs:
|
|||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
# Setup Postgres for testing PostgresStorage
|
||||
postgres:
|
||||
image: postgres
|
||||
|
||||
volumes:
|
||||
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
|
||||
env:
|
||||
POSTGRES_USER: teloxide
|
||||
POSTGRES_PASSWORD: rewrite_it_in_rust
|
||||
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
|
|
4
.github/workflows/postgres/init.sql
vendored
Normal file
4
.github/workflows/postgres/init.sql
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
CREATE ROLE teloxide WITH LOGIN SUPERUSER PASSWORD 'rewrite_it_in_rust'
|
||||
CREATE DATABASE test_postgres_json;
|
||||
CREATE DATABASE test_postgres_bincode;
|
||||
CREATE_DATABASE test_postgres_cbor;
|
Loading…
Reference in a new issue