Skip to content

Commit

Permalink
#46 mod cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
kynmh69 committed Oct 4, 2024
1 parent 0647b3f commit 9882209
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ jobs:
src/go.sum
- name: Run migration
working-directory: ${{ env.UPDATER_DIR }}
working-directory: ${{ env.SRC_DIR }}
shell: bash -l {0}
env:
PSQL_HOSTNAME: localhost
DATABASE: unittest
run: |
go install github.com/pressly/goose/v3/cmd/goose@latest
$(go env GOPATH)/bin/goose --dir database/migrations/ postgres "host=localhost user=app password=password dbname=unittest sslmode=disable" up
go mod download
go run cmd/migration.go
- name: Build
working-directory: ${{ env.UPDATER_DIR }}
Expand Down Expand Up @@ -92,11 +95,14 @@ jobs:
src/go.sum
- name: Run migration
working-directory: ${{ env.API_DIR }}
working-directory: ${{ env.SRC_DIR }}
shell: bash -l {0}
env:
PSQL_HOSTNAME: localhost
DATABASE: unittest
run: |
go install github.com/pressly/goose/v3/cmd/goose@latest
$(go env GOPATH)/bin/goose --dir database/migrations/ postgres "host=localhost user=app password=password dbname=unittest sslmode=disable" up
go mod download
go run cmd/migration.go
- name: Build
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/docker-publish-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ env:
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
API_DIR: "src/api"
SRC_DIR: "src"
AWS_REGION: us-east-1
ECS_SERVICE: holidays-api-service
ECS_CLUSTER: holidays-cluster
Expand Down Expand Up @@ -128,11 +129,14 @@ jobs:
src/go.sum
- name: Run migration
working-directory: ${{ env.API_DIR }}
working-directory: ${{ env.SRC_DIR }}
shell: bash -l {0}
env:
PSQL_HOSTNAME: localhost
DATABASE: unittest
run: |
go install github.com/pressly/goose/v3/cmd/goose@latest
$(go env GOPATH)/bin/goose --dir database/migrations/ postgres "host=localhost user=app password=password dbname=unittest sslmode=disable" up
go mod download
go run cmd/migration.go
- name: Build
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/docker-publish-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ env:
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
UPDATER_DIR: "src/updater"
SRC_DIR: "src"
AWS_REGION: us-east-1
ECS_SERVICE: holidays-updater-service
ECS_CLUSTER: holidays-cluster
Expand Down Expand Up @@ -126,11 +127,14 @@ jobs:
src/go.sum
- name: Run migration
working-directory: ${{ env.UPDATER_DIR }}
working-directory: ${{ env.SRC_DIR }}
shell: bash -l {0}
env:
PSQL_HOSTNAME: localhost
DATABASE: unittest
run: |
go install github.com/pressly/goose/v3/cmd/goose@latest
$(go env GOPATH)/bin/goose --dir database/migrations/ postgres "host=localhost user=app password=password dbname=unittest sslmode=disable" up
go mod download
go run cmd/migration.go
- name: Build
working-directory: ${{ env.UPDATER_DIR }}
Expand Down

0 comments on commit 9882209

Please sign in to comment.