create local dev database for sqlx to compile in ci
This commit is contained in:
parent
033dcf8be0
commit
68da60e17b
12
.build.yml
12
.build.yml
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue