We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d837945 commit 739e098Copy full SHA for 739e098
.github/workflows/workflow.yml
@@ -42,10 +42,22 @@ jobs:
42
uses: actions/setup-go@v5
43
with:
44
go-version: 1.22.4
45
+
46
+ - name: Install golang-migrate
47
+ run: go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
48
49
+ # Run migrations before the tests
50
+ - name: Run Migrations
51
+ env:
52
+ DATABASE_URL: ${{ secrets.DATABASE_URL }}
53
+ run: |
54
+ migrate -path ./migrations -database $DATABASE_URL up
55
56
- name: Run unit tests
57
run: go test -v -tags=unit ./...
58
59
- name: Run integration tests
60
env:
61
ENVIRONMENT: test
- DATABASE_URL: ${{ vars.DATABASE_URL }}
62
63
run: go test -v -tags=integration ./...
0 commit comments