mirror of
https://github.com/Diggsey/sqlxmq.git
synced 2025-02-16 18:15:16 +00:00
18 lines
513 B
YAML
18 lines
513 B
YAML
name: "Setup PostgreSQL database"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Set environment variable
|
|
shell: bash
|
|
run: echo "DATABASE_URL=postgres://postgres:password@localhost/sqlxmq" >> $GITHUB_ENV
|
|
|
|
- name: Start PostgreSQL on Ubuntu
|
|
shell: bash
|
|
run: |
|
|
sudo systemctl start postgresql.service
|
|
pg_isready
|
|
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'password'"
|
|
|
|
- name: Setup database
|
|
shell: bash
|
|
run: cargo sqlx database setup
|