Commit bf2f25a 1 parent 739e098 commit bf2f25a Copy full SHA for bf2f25a
File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -36,28 +36,24 @@ jobs:
36
36
--health-interval 10s
37
37
--health-timeout 5s
38
38
--health-retries 5
39
+
39
40
steps :
40
41
- uses : actions/checkout@v4
41
42
- name : Set up Go
42
43
uses : actions/setup-go@v5
43
44
with :
44
45
go-version : 1.22.4
45
-
46
46
- name : Install golang-migrate
47
47
run : go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
48
-
49
- # Run migrations before the tests
50
48
- name : Run Migrations
51
49
env :
52
- DATABASE_URL : ${{ secrets.DATABASE_URL }}
50
+ DATABASE_URL : postgres://postgres:postgres@localhost:5432/bookreviewapp_test?sslmode=disable
53
51
run : |
54
- migrate -path ./migrations -database $DATABASE_URL up
55
-
52
+ migrate -path ./migrations -database "$DATABASE_URL" up
56
53
- name : Run unit tests
57
54
run : go test -v -tags=unit ./...
58
-
59
55
- name : Run integration tests
60
56
env :
61
57
ENVIRONMENT : test
62
- DATABASE_URL : ${{ secrets.DATABASE_URL }}
58
+ DATABASE_URL : postgres://postgres:postgres@localhost:5432/bookreviewapp_test?sslmode=disable
63
59
run : go test -v -tags=integration ./...
You can’t perform that action at this time.
0 commit comments