sqlxmq/.github/actions/postgres/action.yml
2021-03-30 00:10:08 +01:00

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