-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Docker-compose CI | ||
|
||
on: | ||
push: | ||
branches: [ "ci" ] | ||
pull_request: | ||
branches: [ "load" ] | ||
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Lint go | ||
run: go vet ./... | ||
|
||
tests: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
cache-dependency-path: go.sum | ||
- name: Docker up for tests | ||
run: | | ||
cd ./cmd/microservices | ||
docker-compose up -d --build postgres | ||
docker-compose up -d --build migrate-service | ||
docker-compose up -d --build filling-service | ||
- name: Install dependencies | ||
run: go mod tidy | ||
- name: Tests | ||
run: go test ./... | ||
|
||
|
||
# deploy: | ||
# needs: tests | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v4 | ||
# - name: Run command on remote server | ||
# uses: D3rHase/[email protected] | ||
# with: | ||
# host: ${{secrets.SSH_HOST}} | ||
# user: ${{secrets.SSH_USER}} | ||
# private_key: ${{secrets.SSH_PRIVATE_KEY}} | ||
# command: | | ||
# cd ${{ secrets.PROJECT_FOLDER }}; | ||
# git checkout load; | ||
# git pull; | ||
# docker-compose --file docker-compose.prod.yml down; | ||
# docker-compose --file docker-compose.prod.yml up -d; | ||
# docker system prune --all --force; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters