Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

Commit 67560ac

Browse files
committed
added specific GH actions env and improved the CI workflow
1 parent ea80e11 commit 67560ac

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.demo.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
APP_ENV=dev
22
DATABASE_URL=mongodb://mongo:27017
3+
DATA_STORE=mongo
34
JWT_SECRET=changeMe
45
MAIL_PROVIDER=dev
56
STORAGE_PROVIDER=local

.gh-actions-env

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
APP_ENV=dev
2+
DATABASE_URL=mongodb://localhost:27017
3+
DATA_STORE=mongo
4+
JWT_SECRET=changeMe
5+
MAIL_PROVIDER=dev
6+
STORAGE_PROVIDER=local
7+
8+
FROM_NAME=Your company
9+
REDIS_HOST=localhost:6379
10+
REDIS_PASSWORD=
11+
LOCAL_STORAGE_URL=http://localhost:8099

.github/workflows/go.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,21 @@ jobs:
2020
uses: actions/setup-go@v2
2121
with:
2222
go-version: 1.17
23+
24+
- name: Setup .env file (mongo)
25+
run: mv .gh-actions-env .env
2326

2427
- name: Build
2528
run: make build
2629

27-
- name: Test
30+
- name: Test (Mongo data store)
31+
run: make alltest
32+
33+
- name: Change DATA_STORAGE to PostgreSQL
34+
run: sed -i 's/DATA_STORAGE=mongo/DATA_STORAGE=pg/g' .env
35+
36+
- name: Change DATABASE_URL to PG connection string
37+
run: sed -i 's/DATABASE_URL=mongodb:\/\/localhost:27017/DATABASE_URL=user=postgres password=postgres dbname=postgres sslmode=disable/g' .env
38+
39+
- name: Test (PostgreSQL data store)
2840
run: make alltest

0 commit comments

Comments
 (0)