create local dev database for sqlx to compile in ci

This commit is contained in:
c0repwn3r 2023-02-07 13:39:28 -05:00
parent 033dcf8be0
commit 68da60e17b
Signed by: core
GPG Key ID: FDBF740DADDCEECF
1 changed files with 12 additions and 0 deletions

View File

@ -3,9 +3,21 @@ packages:
- rust
- cargo
- openssl-dev
- postgresql
sources:
- https://git.e3t.cc/~core/trifid
tasks:
- setup: |
mkdir /run/postgresql
chown postgres:postgres /run/postgresql/
su postgres -c mkdir /var/lib/postgresql/data
su postgres -c chmod 0700 /var/lib/postgresql/data
su postgres -c initdb -D /var/lib/postgresql/data
su postgres -c pg_ctl start -D /var/lib/postgresql/data
cd /home/build/trifid
cargo install sqlx-cli
sqlx database create
sqlx mig run
- check: |
cd /home/build/trifid
cargo check --locked