Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
afurgapil committed Jun 22, 2024
1 parent baa551f commit 4270ad5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ jobs:
with:
go-version: "^1.22.2"

- name: Install dependencies
run: go mod download
- name: Install golang-migrate
run: |
go get -u -d github.com/golang-migrate/migrate/cmd/migrate
cd $GOPATH/pkg/mod/github.com/golang-migrate/migrate@v4.12.2/cmd/migrate
go build -tags 'postgres' -ldflags="-X main.Version=$(git describe --tags)" -o $GOPATH/bin/migrate .
- name: Start PostgreSQL and wait for connection
run: |
Expand All @@ -42,8 +45,6 @@ jobs:
- name: Run database migrations
run: |
echo "package main\n\nimport _ \"github.com/golang-migrate/migrate/v4/database/postgres\"" > dummy.go
go mod tidy
migrate -database "postgres://postgres:${{ secrets.POSTGRES_PASSWORD }}@localhost:5432/librarymanagementsystem_test?sslmode=disable" -path migrations/ up
- name: Run tests
Expand Down

0 comments on commit 4270ad5

Please sign in to comment.