Skip to content

Commit c19e641

Browse files
committed
add public schema permissions for diesel-cli install
1 parent 28859c5 commit c19e641

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
DB_HOST: localhost
1111
DB_USERNAME: postgres
1212
PGPASSWORD: postgres
13+
DATABASE_URL: "postgres://cortex_tester:cortex_tester@localhost/cortex_tester"
1314
steps:
1415
- name: Install CorTeX Dependencies
1516
uses: ryankurte/[email protected]
@@ -20,11 +21,9 @@ jobs:
2021
sudo systemctl start postgresql.service
2122
- name: Setup Postgresql DB
2223
run: |
23-
sudo -u postgres psql -c 'create database cortex;'
2424
sudo -u postgres psql -c 'create database cortex_tester;'
25-
sudo -u postgres psql -c "create user cortex with password 'cortex';"
2625
sudo -u postgres psql -c "create user cortex_tester with password 'cortex_tester';"
27-
sudo -u postgres psql -c 'GRANT ALL PRIVILEGES ON DATABASE cortex TO cortex;'
26+
sudo -u postgres psql -c 'GRANT ALL PRIVILEGES ON SCHEMA public TO cortex_tester;'
2827
sudo -u postgres psql -c 'GRANT ALL PRIVILEGES ON DATABASE cortex_tester TO cortex_tester;'
2928
- uses: actions/checkout@v2
3029
- uses: actions-rs/toolchain@v1
@@ -34,8 +33,8 @@ jobs:
3433
override: true
3534
- run: |
3635
cargo install diesel_cli --vers 1.1.2 --no-default-features --features postgres
36+
diesel setup
3737
diesel migration run
38-
DATABASE_URL="postgres://cortex_tester:cortex_tester@localhost/cortex_tester" diesel migration run
3938
- uses: actions-rs/cargo@v1
4039
with:
4140
command: test

0 commit comments

Comments
 (0)