redisをkvsCommanderインターフェースで分離した #43
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
name: test | |
on: | |
# トリガー | |
push: | |
branches: | |
- main | |
# 非機能要件のファイルの変更は除外 | |
paths-ignore: | |
- "app/docs/**" | |
- "Dockerfile.**" | |
- "compose.yml" | |
- "air.toml" | |
jobs: | |
# ユニットテスト | |
unit-test: | |
name: Run Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
# チェックアウト | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
# Goのセットアップ | |
- name: Go Setup | |
uses: actions/setup-go@v5 | |
with: | |
# goバージョンを参照するファイル | |
go-version-file: app/go.mod | |
# キャッシュ | |
cache: true | |
# 依存関係のキャッシュにおける追跡ファイル | |
cache-dependency-path: app/go.sum | |
# マルチモジュールを1つのワークスペースで管理 | |
- name: Setup Workspace | |
run: go work init ./pkg ./app | |
# appモジュールのテスト | |
- name: Run App Test | |
run: make test-app | |
# pkgモジュールのテスト | |
- name: Run Pkg Test | |
run: make test-pkg | |
# インテグレーションテスト | |
integration-test: | |
name: Run Integration Tests | |
runs-on: ubuntu-latest | |
needs: unit-test | |
steps: | |
# チェックアウト | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
# Goのセットアップ | |
- name: Go Setup | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: app/go.mod | |
cache: true | |
cache-dependency-path: app/go.sum | |
# マルチモジュールを1つのワークスペースで管理 | |
- name: Setup Workspace | |
run: go work init ./pkg ./app | |
- name: Run Api Integration Test | |
run: make test-integration |