Skip to content

Commit

Permalink
fix: unit tests (#23)
Browse files Browse the repository at this point in the history
* fix: unit tests

* remove postgres
  • Loading branch information
hwbrzzl authored Jul 12, 2024
1 parent 8b8d0a7 commit fd321d1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
go: [ "1.21", "1.22" ]
runs-on: ubuntu-latest
steps:
- name: Set up PostgreSQL
uses: harmon758/postgresql-action@v1
with:
postgresql version: '11'
postgresql db: 'goravel'
postgresql user: 'goravel'
postgresql password: 'goravel'
# - name: Set up PostgreSQL
# uses: harmon758/postgresql-action@v1
# with:
# postgresql version: '11'
# postgresql db: 'goravel'
# postgresql user: 'goravel'
# postgresql password: 'goravel'
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
Expand Down
Binary file added goravel
Binary file not shown.
16 changes: 16 additions & 0 deletions tests/services/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package services

import (
"testing"

"github.com/goravel/framework/facades"
"github.com/goravel/framework/support/file"
)

func TestMain(m *testing.M) {
facades.Artisan().Call("migrate")

m.Run()

file.Remove("goravel")
}

0 comments on commit fd321d1

Please sign in to comment.