This repository was archived by the owner on Sep 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 1
1
APP_ENV=dev
2
2
APP_SECRET=a-very-long-key-should-be-32long
3
- DATABASE_URL=mongodb://localhost:27017
4
- DATA_STORE=mongo
3
+ DATABASE_URL=user=postgres password=postgres dbname=postgres sslmode=disable
4
+ DATA_STORE=pg
5
5
JWT_SECRET=changeMe
6
6
MAIL_PROVIDER=dev
7
7
STORAGE_PROVIDER=local
Original file line number Diff line number Diff line change @@ -16,29 +16,28 @@ jobs:
16
16
- name : Install dependencies for chromedp
17
17
run : sudo apt-get install -y libnspr4 libnss3 libexpat1 libfontconfig1 libuuid1
18
18
19
-
20
19
- name : Start containers (PostgreSQL, MongoDB, Redis)
21
20
run : docker-compose -f "docker-compose-unittest.yml" up -d
22
21
23
22
- name : Set up Go
24
23
uses : actions/setup-go@v2
25
24
with :
26
25
go-version : 1.18
27
-
28
- - name : Setup .env file (mongo )
26
+
27
+ - name : Setup .env file (PostgreSQL )
29
28
run : mv .gh-actions-env .env
30
29
31
30
- name : Build
32
31
run : make build
33
32
34
- - name : Test (Mongo data store)
33
+ - name : Test (PostgreSQL data store)
35
34
run : make alltest
36
-
37
- - name : Change DATA_STORE to PostgreSQL
38
- run : sed -i 's/DATA_STORE=mongo/DATA_STORE=pg/g' .env
39
-
40
- - name : Change DATABASE_URL to PG connection string
41
- run : sed -i 's/DATABASE_URL=mongodb:\/\/localhost:27017/DATABASE_URL=user=postgres password=postgres dbname=postgres sslmode=disable/g' .env
42
35
43
- - name : Test (PostgreSQL data store)
36
+ - name : Change DATA_STORE to Mongo
37
+ run : sed -i 's/DATA_STORE=pg/DATA_STORE=mongo/g' .env
38
+
39
+ - name : Change DATABASE_URL to Mongo connection string
40
+ run : sed -i 's/DATABASE_URL=user=postgres password=postgres dbname=postgres sslmode=disable/DATABASE_URL=mongodb:\/\/localhost:27017/g' .env
41
+
42
+ - name : Test (Mongo data store)
44
43
run : make alltest
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ deploy: build
17
17
scp -qr ./sql/* sb-poc:/home/dstpierre/sql/
18
18
19
19
alltest :
20
- @go test --race --cover ./...
20
+ @go clean -testcache && go test --race --cover ./...
21
21
22
22
thistest :
23
23
go test -run $(TESTNAME ) --cover ./...
You can’t perform that action at this time.
0 commit comments