Skip to content

Commit

Permalink
remove redundant CI process
Browse files Browse the repository at this point in the history
Removed publishing (except for image delivery), bench, sharding test process
  • Loading branch information
dongwoo authored and DDnK-dev committed Jun 7, 2024
1 parent 23b3662 commit aeaad64
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 131 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/chart-release.yml

This file was deleted.

176 changes: 89 additions & 87 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: CI

on:
push:
branches: [ main ]
branches:
- main
- 'test/*' # my branch just for test
pull_request:
branches: [ main ]

Expand Down Expand Up @@ -46,90 +48,90 @@ jobs:
- name: Test
run: go test -tags integration -race -coverprofile=coverage.txt -covermode=atomic -v ./...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# file: ./coverage.txt
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

bench:
name: bench
runs-on: ubuntu-latest
permissions: write-all
steps:

- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code
uses: actions/checkout@v4

- name: Get tools dependencies
run: make tools

- name: Stack
run: docker-compose -f build/docker/docker-compose.yml up --build -d

- name: Bench
run: make bench

- name: Download previous benchmark data
uses: actions/cache@v3
with:
path: ./cache
key: ${{ runner.os }}-benchmark

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
with:
name: Go Benchmark
tool: 'go'
output-file-path: output.txt
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: false
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-always: true

sharding_test:
name: sharding_test
runs-on: ubuntu-latest
steps:

- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code
uses: actions/checkout@v4

- name: Get tools dependencies
run: make tools

- name: Check Docker Compose Version
run: docker compose --version

- name: Run the Config server, Shard 1 and Shard 2
run: docker compose -f build/docker/sharding/docker-compose.yml up --build -d --wait config1 shard1-1 shard2-1

- name: Initialize the Config server
run: docker compose -f build/docker/sharding/docker-compose.yml exec config1 mongosh test /scripts/init-config1.js

- name: Initialize the Shard 1
run: docker compose -f build/docker/sharding/docker-compose.yml exec shard1-1 mongosh test /scripts/init-shard1-1.js
- name: Initialize the Shard 2
run: docker compose -f build/docker/sharding/docker-compose.yml exec shard2-1 mongosh test /scripts/init-shard2-1.js

- name: Run the Mongos
run: docker compose -f build/docker/sharding/docker-compose.yml up --build -d --wait mongos1

- name: Initialize the Mongos
run: docker compose -f build/docker/sharding/docker-compose.yml exec mongos1 mongosh test /scripts/init-mongos1.js

- name: Run the tests with sharding tag
run: go test -tags sharding -race -v ./test/sharding/...
# bench:
# name: bench
# runs-on: ubuntu-latest
# permissions: write-all
# steps:
#
# - name: Set up Go ${{ env.GO_VERSION }}
# uses: actions/setup-go@v4
# with:
# go-version: ${{ env.GO_VERSION }}
#
# - name: Check out code
# uses: actions/checkout@v4
#
# - name: Get tools dependencies
# run: make tools
#
# - name: Stack
# run: docker-compose -f build/docker/docker-compose.yml up --build -d
#
# - name: Bench
# run: make bench
#
# - name: Download previous benchmark data
# uses: actions/cache@v3
# with:
# path: ./cache
# key: ${{ runner.os }}-benchmark
#
# - name: Store benchmark result
# uses: benchmark-action/github-action-benchmark@v1
# if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
# with:
# name: Go Benchmark
# tool: 'go'
# output-file-path: output.txt
# external-data-json-path: ./cache/benchmark-data.json
# fail-on-alert: false
# github-token: ${{ secrets.GITHUB_TOKEN }}
# comment-always: true
#
# sharding_test:
# name: sharding_test
# runs-on: ubuntu-latest
# steps:
#
# - name: Set up Go ${{ env.GO_VERSION }}
# uses: actions/setup-go@v3
# with:
# go-version: ${{ env.GO_VERSION }}
#
# - name: Check out code
# uses: actions/checkout@v4
#
# - name: Get tools dependencies
# run: make tools
#
# - name: Check Docker Compose Version
# run: docker compose --version
#
# - name: Run the Config server, Shard 1 and Shard 2
# run: docker compose -f build/docker/sharding/docker-compose.yml up --build -d --wait config1 shard1-1 shard2-1
#
# - name: Initialize the Config server
# run: docker compose -f build/docker/sharding/docker-compose.yml exec config1 mongosh test /scripts/init-config1.js
#
# - name: Initialize the Shard 1
# run: docker compose -f build/docker/sharding/docker-compose.yml exec shard1-1 mongosh test /scripts/init-shard1-1.js
#
# - name: Initialize the Shard 2
# run: docker compose -f build/docker/sharding/docker-compose.yml exec shard2-1 mongosh test /scripts/init-shard2-1.js
#
# - name: Run the Mongos
# run: docker compose -f build/docker/sharding/docker-compose.yml up --build -d --wait mongos1
#
# - name: Initialize the Mongos
# run: docker compose -f build/docker/sharding/docker-compose.yml exec mongos1 mongosh test /scripts/init-mongos1.js
#
# - name: Run the tests with sharding tag
# run: go test -tags sharding -race -v ./test/sharding/...
1 change: 1 addition & 0 deletions .github/workflows/docker-publish-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- 'test/*' # my branch just for test
jobs:
call-base-docker-publish:
uses: ./.github/workflows/base-docker-publish.yml
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@ bench: ## runs benchmark tests
rm -f pipe

docker: ## builds docker images with the current version and latest tag
docker buildx build --push --platform linux/amd64,linux/arm64,linux/386 -t yorkieteam/yorkie:$(YORKIE_VERSION) -t yorkieteam/yorkie:latest .
#docker buildx build --push --platform linux/amd64,linux/arm64,linux/386 -t yorkieteam/yorkie:$(YORKIE_VERSION) -t yorkieteam/yorkie:latest .
docker buildx build \
--push --platform linux/amd64 \
-t wdk1994/yorkie:$(YORKIE_VERSION) \
-t wdk1994/yorkie:latest .

docker-latest: ## builds docker images with latest tag
docker buildx build --push --platform linux/amd64,linux/arm64,linux/386 -t yorkieteam/yorkie:latest .
docker buildx build --push --platform linux/amd64 -t wdk1994/yorkie:latest .

swagger: ## runs swagger-ui with the yorkie api docs
docker run -p 3000:8080 \
Expand Down

0 comments on commit aeaad64

Please sign in to comment.