Skip to content

Commit cbe65ff

Browse files
committed
fixed e2e test configuration: why does it run for only sqlite...
1 parent 68a6d4c commit cbe65ff

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

.github/workflows/tests.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
ports:
2626
- 3307:3306
2727
# needed because the mysql container does not provide a healthcheck
28-
options: --health-cmd "mysqladmin ping -h localhost" --health-interval 10s --health-timeout 5s --health-retries 5
28+
options: --health-cmd "mysqladmin ping -h localhost" --health-interval 5s --health-timeout 5s --health-retries 10
2929

3030
steps:
3131
- uses: actions/checkout@v3
@@ -51,9 +51,9 @@ jobs:
5151
run: |
5252
go test -v -tags sqlite -race ./...
5353
54-
- name: Reset soda and run e2e
54+
- name: Reset database and run e2e
5555
env:
56-
SODA_DIALECT: "sqlite"
56+
SODA_DIALECT: "mysql"
5757
run: |
5858
soda drop -e $SODA_DIALECT -p ./testdata/migrations
5959
soda create -e $SODA_DIALECT -p ./testdata/migrations
@@ -77,9 +77,9 @@ jobs:
7777
POSTGRES_PASSWORD: postgres
7878
POSTGRES_DB: postgres
7979
ports:
80-
- 5432:5432
80+
- 5433:5432
8181
# needed because the postgres container does not provide a healthcheck
82-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
82+
options: --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10
8383

8484
steps:
8585
- uses: actions/checkout@v3
@@ -105,9 +105,9 @@ jobs:
105105
run: |
106106
go test -v -tags sqlite -race ./...
107107
108-
- name: Reset soda and run e2e
108+
- name: Reset database and run e2e
109109
env:
110-
SODA_DIALECT: "sqlite"
110+
SODA_DIALECT: "postgres"
111111
run: |
112112
soda drop -e $SODA_DIALECT -p ./testdata/migrations
113113
soda create -e $SODA_DIALECT -p ./testdata/migrations
@@ -136,12 +136,15 @@ jobs:
136136
pushd crdb
137137
wget -qO- https://binaries.cockroachdb.com/cockroach-v21.1.19.linux-amd64.tgz | tar -xz
138138
mv cockroach-v21.1.19.linux-amd64/* .
139+
ln -s `pwd`/cockroach /usr/local/bin/
140+
cockroach version
139141
./cockroach start-single-node --insecure --background
140142
popd
141143
142144
- name: Install and run soda
143145
env:
144146
SODA_DIALECT: "cockroach"
147+
COCKROACH_PORT: 26257
145148
run: |
146149
go install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest
147150
soda drop -e $SODA_DIALECT -p ./testdata/migrations
@@ -151,12 +154,14 @@ jobs:
151154
- name: Test
152155
env:
153156
SODA_DIALECT: "cockroach"
157+
COCKROACH_PORT: 26257
154158
run: |
155159
go test -v -tags sqlite -race ./...
156160
157-
- name: Reset soda and run e2e
161+
- name: Reset database and run e2e
158162
env:
159-
SODA_DIALECT: "sqlite"
163+
SODA_DIALECT: "cockroach"
164+
COCKROACH_PORT: 26257
160165
run: |
161166
soda drop -e $SODA_DIALECT -p ./testdata/migrations
162167
soda create -e $SODA_DIALECT -p ./testdata/migrations
@@ -213,7 +218,7 @@ jobs:
213218
go test -v -tags sqlite ./...
214219
shell: bash
215220

216-
- name: Reset soda and run e2e
221+
- name: Reset database and run e2e
217222
if: ${{ matrix.os != 'windows-latest' }}
218223
env:
219224
SODA_DIALECT: "sqlite"
@@ -224,7 +229,7 @@ jobs:
224229
go test -v -tags sqlite,e2e -race ./...
225230
shell: bash
226231

227-
- name: Reset soda and run e2e without race detection
232+
- name: Reset database and run e2e without race detection
228233
if: ${{ matrix.os == 'windows-latest' }}
229234
env:
230235
SODA_DIALECT: "sqlite"

database.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ mysql:
22
dialect: "mysql"
33
database: "pop_test"
44
host: {{ envOr "MYSQL_HOST" "127.0.0.1" }}
5-
port: {{ envOr "MYSQL_PORT" "3306" }}
5+
port: {{ envOr "MYSQL_PORT" "3307" }}
66
user: {{ envOr "MYSQL_USER" "root" }}
77
password: {{ envOr "MYSQL_PASSWORD" "root" }}
88

99
postgres:
10-
url: "postgres://postgres:postgres@localhost:5432/pop_test?sslmode=disable"
10+
url: "postgres://postgres:postgres@localhost:5433/pop_test?sslmode=disable"
1111
pool: 25
1212

1313
cockroach:
14-
# url: "cockroach://[email protected]:26257/pop_test?application_name=cockroach&sslmode=disable"
14+
# url: "cockroach://[email protected]:26258/pop_test?application_name=cockroach&sslmode=disable"
1515
dialect: "cockroach"
1616
database: "pop_test"
1717
host: {{ envOr "COCKROACH_HOST" "127.0.0.1" }}
18-
port: {{ envOr "COCKROACH_PORT" "26257" }}
18+
port: {{ envOr "COCKROACH_PORT" "26258" }}
1919
user: {{ envOr "COCKROACH_USER" "root" }}
2020
password: {{ envOr "COCKROACH_PASSWORD" "" }}
2121
options:
@@ -31,7 +31,7 @@ sqlserver:
3131

3232
sqlite:
3333
dialect: "sqlite3"
34-
database: "./sql_scripts/sqlite/test.sqlite"
34+
database: "./tmp/test.sqlite"
3535
options:
3636
mode: rwc
3737

0 commit comments

Comments
 (0)