refactor: event consumer 정리 및 실행 파이프라인 전반 테스트 강화 #1
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| unit: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| GOCACHE: /tmp/gocache | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: go.sum | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run unit tests | |
| run: | | |
| packages=$(go list ./... | grep -v '/test$') | |
| if [ -z "$packages" ]; then | |
| echo "No package to test." | |
| exit 0 | |
| fi | |
| go test $packages | |
| integration: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| GOCACHE: /tmp/gocache | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: go.sum | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run integration tests | |
| run: go test ./test -count=1 |