Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新規CIワークフローをトリガーするためにmainに対してドラフトのPRを作成 #1584

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
76801df
Dressca管理アプリ(バックエンド)の作成 (#1580)
kenjiyoshid-a Nov 20, 2024
6f768b6
フロントエンドアプリケーションのソース一式をmainにマージ
KentaHizume Nov 20, 2024
a84767b
adminワークスペースを追加
KentaHizume Nov 20, 2024
85779ce
admin用のnpmスクリプトをルートプロジェクトに追加
KentaHizume Nov 20, 2024
3661389
admin用のCIワークフローを追加
KentaHizume Nov 20, 2024
dfcc125
#1236 を反映
KentaHizume Nov 20, 2024
e001e14
openapi-generatorの自動生成コードを最新化
KentaHizume Nov 20, 2024
389549b
[email protected]にアップデート
KentaHizume Nov 20, 2024
0f3893c
カタログアイテムのdtoの引数を修正
kenjiyoshid-a Nov 21, 2024
924f005
アプリケーションサービスの更新メソッドの引数を修正
kenjiyoshid-a Nov 21, 2024
1b987fd
カタログアイテムのgetのdtoのフィールドに行バージョンを追加
kenjiyoshid-a Nov 21, 2024
ff3de4b
API仕様の軽微な修正
kenjiyoshid-a Nov 21, 2024
4bf0256
javadocの誤記を修正
kenjiyoshid-a Nov 25, 2024
7704adc
Revert "[email protected]にアップデート"
KentaHizume Nov 25, 2024
fbd25e3
Revert "openapi-generatorの自動生成コードを最新化"
KentaHizume Nov 25, 2024
7768921
Merge branch 'feature/管理アプリを策定したAPI仕様に沿って修正する' into develop/admin/フロン…
KentaHizume Nov 25, 2024
d2bbb70
OpenAPI仕様書のパスを正しいものに修正
KentaHizume Nov 25, 2024
271270d
クライアントコードを再生成
KentaHizume Nov 25, 2024
a2b6fd8
PagedListOfCatalogItemResponseのフィールドをMarisに合わせて修正
kenjiyoshid-a Nov 25, 2024
6fdb3a7
mockの不完全な実装部分を削除
KentaHizume Nov 25, 2024
a667db9
devモードのエンドポイントのURLを修正
KentaHizume Nov 25, 2024
02d9365
vitestのmswの設定についてデバッグに使用していたものを削除
KentaHizume Nov 25, 2024
79597c1
カタログアイテムの参照、追加、更新、削除について自動テストを実装
KentaHizume Nov 25, 2024
07f910d
Merge branch 'main' into develop/admin/dressca-admin-main
KentaHizume Nov 25, 2024
72e20ee
Merge branch 'develop/admin/dressca-admin-main' into develop/admin/フロ…
KentaHizume Nov 25, 2024
bc6b8af
Merge branch 'feature/PagedListOfCatalogItemResponseをMarisに合わせて修正する' …
KentaHizume Nov 25, 2024
5d172e3
adminのコードを新しい仕様書に合わせて自動生成
KentaHizume Nov 25, 2024
c624d3b
コードにコメントを追加。
KentaHizume Nov 26, 2024
d5e0a50
不足しているコメントを追加。
KentaHizume Nov 26, 2024
053d3c6
コメントを改善
KentaHizume Nov 26, 2024
deb159e
Adminについてopenapi-generatorのバージョンアップを確認する
KentaHizume Nov 26, 2024
2cd8b81
リダイレクト漏れを修正
KentaHizume Nov 26, 2024
cc9e229
[email protected]にアップデート
KentaHizume Nov 26, 2024
9faf56e
Promise.thenで非同期処理を待っていた箇所を、awaitで待つように修正
KentaHizume Nov 27, 2024
37ed202
不適当なメソッド命名を修正
KentaHizume Nov 27, 2024
90e46e0
カテゴリとブランドの取得をサービスクラスに委譲するリファクタを実施
KentaHizume Nov 27, 2024
36cea6c
PagedListOfCatalogItemResponseのフィールドに総ページ数、前ページの有無、後ページの有無を追加 (#1610)
kenjiyoshid-a Dec 16, 2024
67f9efa
Merge remote-tracking branch 'origin/develop/admin/dressca-admin-main…
KentaHizume Dec 16, 2024
f689341
管理アプリ(バックエンド)を策定したAPI仕様に沿って修正 (#1594)
kenjiyoshid-a Dec 18, 2024
ca72717
Merge remote-tracking branch 'origin/develop/admin/dressca-admin-main…
KentaHizume Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,30 @@ updates:
- "gradle"
- "dependencies"

- package-ecosystem: "gradle"
directory: "/samples/web-csr/dressca-backend/web-admin"
schedule:
interval: "daily"
open-pull-requests-limit: 20
commit-message:
prefix: "gradle-web-admin"
labels:
- "target: Dressca"
- "gradle"
- "dependencies"

- package-ecosystem: "gradle"
directory: "/samples/web-csr/dressca-backend/web-consumer"
schedule:
interval: "daily"
open-pull-requests-limit: 20
commit-message:
prefix: "gradle-web-consumer"
labels:
- "target: Dressca"
- "gradle"
- "dependencies"

# Azure AD B2C
- package-ecosystem: "npm"
directory: "/samples/azure-ad-b2c-sample/auth-frontend"
Expand Down
80 changes: 64 additions & 16 deletions .github/workflows/check-openapi-generator-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,38 @@ jobs:
- name: 現在のOpenAPI Generatorのバージョン取得
id: get-current-openapi-generator-version
run: |
echo "current-version=$(jq -r '.["generator-cli"].version' ./samples/web-csr/dressca-frontend/consumer/openapitools.json)" >> $GITHUB_OUTPUT
echo "current-version-consumer=$(jq -r '.["generator-cli"].version' ./samples/web-csr/dressca-frontend/consumer/openapitools.json)" >> $GITHUB_OUTPUT
echo "current-version-admin=$(jq -r '.["generator-cli"].version' ./samples/web-csr/dressca-frontend/admin/openapitools.json)" >> $GITHUB_OUTPUT

- name: アップデート要否を判定
id: check-version-update
run: |
if [[ ${{ steps.get-latest-openapi-generator-version.outputs.latest-version }} == ${{ steps.get-current-openapi-generator-version.outputs.current-version }} ]]; then
echo "update-required=false" >> $GITHUB_OUTPUT
if [[ ${{ steps.get-latest-openapi-generator-version.outputs.latest-version }} == ${{ steps.get-current-openapi-generator-version.outputs.current-version-consumer }} ]]; then
echo "update-required-consumer=false" >> $GITHUB_OUTPUT
else
echo "update-required=true" >> $GITHUB_OUTPUT
echo "update-required-consumer=true" >> $GITHUB_OUTPUT
fi
if [[ ${{ steps.get-latest-openapi-generator-version.outputs.latest-version }} == ${{ steps.get-current-openapi-generator-version.outputs.current-version-admin }} ]]; then
echo "update-required-admin=false" >> $GITHUB_OUTPUT
else
echo "update-required-admin=true" >> $GITHUB_OUTPUT
fi

- name: サマリに出力
run: |
echo "# 確認結果" >> $GITHUB_STEP_SUMMARY
echo "openapi-generator のバージョンは ${{ steps.get-latest-openapi-generator-version.outputs.latest-version }} です。" >> $GITHUB_STEP_SUMMARY
echo "openapitools.json の openapi-generator のバージョンは ${{ steps.get-current-openapi-generator-version.outputs.current-version }} です。" >> $GITHUB_STEP_SUMMARY
echo "アップデート要否の判定結果は ${{ steps.check-version-update.outputs.update-required }} です。">> $GITHUB_STEP_SUMMARY
echo "## Dressca-Consumer" >> $GITHUB_STEP_SUMMARY
echo "openapitools.json の openapi-generator のバージョンは ${{ steps.get-current-openapi-generator-version.outputs.current-version-consumer }} です。" >> $GITHUB_STEP_SUMMARY
echo "アップデート要否の判定結果は ${{ steps.check-version-update.outputs.update-required-consumer }} です。">> $GITHUB_STEP_SUMMARY
echo "## Dressca-Admin" >> $GITHUB_STEP_SUMMARY
echo "openapitools.json の openapi-generator のバージョンは ${{ steps.get-current-openapi-generator-version.outputs.current-version-admin }} です。" >> $GITHUB_STEP_SUMMARY
echo "アップデート要否の判定結果は ${{ steps.check-version-update.outputs.update-required-admin }} です。">> $GITHUB_STEP_SUMMARY

- name: issue を作成
id: create-issue
if: ${{ steps.check-version-update.outputs.update-required == 'true' }}

- name: issue を作成(Dressca-Consumer)
id: create-issue-consumer
if: ${{ steps.check-version-update.outputs.update-required-consumer == 'true' }}
uses: Wandalen/wretry.action@master
with:
action: dblock/create-a-github-issue@v3
Expand All @@ -72,17 +83,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET_APP_NAME: "Dressca-Consumer"
LATEST_VERSION: ${{ steps.get-latest-openapi-generator-version.outputs.latest-version }}
CURRENT_VERSION: ${{ steps.get-current-openapi-generator-version.outputs.current-version }}
CURRENT_VERSION: ${{ steps.get-current-openapi-generator-version.outputs.current-version-consumer }}


- name: issue の情報を出力
if: ${{ steps.check-version-update.outputs.update-required == 'true' }}
- name: issue の情報を出力(Dressca-Consumer)
if: ${{ steps.check-version-update.outputs.update-required-consumer == 'true' }}
env:
STATUS: ${{ steps.create-issue.outputs.outputs && fromJson(steps.create-issue.outputs.outputs).status }}
ISSUE_NUMBER: ${{ steps.create-issue.outputs.outputs && fromJson(steps.create-issue.outputs.outputs).number }}
ISSUE_URL: ${{ steps.create-issue.outputs.outputs && fromJson(steps.create-issue.outputs.outputs).url }}
STATUS: ${{ steps.create-issue-consumer.outputs.outputs && fromJson(steps.create-issue-consumer.outputs.outputs).status }}
ISSUE_NUMBER: ${{ steps.create-issue-consumer.outputs.outputs && fromJson(steps.create-issue-consumer.outputs.outputs).number }}
ISSUE_URL: ${{ steps.create-issue-consumer.outputs.outputs && fromJson(steps.create-issue-consumer.outputs.outputs).url }}
run: |
echo "# issue の作成結果" >> $GITHUB_STEP_SUMMARY
echo "# issue の作成結果(Dressca-Consumer)" >> $GITHUB_STEP_SUMMARY
if [ $STATUS = 'created' ]; then
echo "issue を新規作成しました。" >> $GITHUB_STEP_SUMMARY
elif [ $STATUS = 'updated' ]; then
Expand All @@ -93,3 +104,40 @@ jobs:
echo issue number: $ISSUE_NUMBER >> $GITHUB_STEP_SUMMARY
echo status: $STATUS >> $GITHUB_STEP_SUMMARY
echo - $ISSUE_URL >> $GITHUB_STEP_SUMMARY

- name: issue を作成(Dressca-Admin)
id: create-issue-admin
if: ${{ steps.check-version-update.outputs.update-required-admin == 'true' }}
uses: Wandalen/wretry.action@master
with:
action: dblock/create-a-github-issue@v3
with: |
filename: ./.github/ISSUE_TEMPLATE/99-openapi-generator-update-issue.md
update_existing: true
search_existing: open
attempt_limit: 3
attempt_delay: 300000
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET_APP_NAME: "Dressca-Admin"
LATEST_VERSION: ${{ steps.get-latest-openapi-generator-version.outputs.latest-version }}
CURRENT_VERSION: ${{ steps.get-current-openapi-generator-version.outputs.current-version-admin }}

- name: issue の情報を出力(Dressca-Admin)
if: ${{ steps.check-version-update.outputs.update-required-admin == 'true' }}
env:
STATUS: ${{ steps.create-issue-admin.outputs.outputs && fromJson(steps.create-issue-admin.outputs.outputs).status }}
ISSUE_NUMBER: ${{ steps.create-issue-admin.outputs.outputs && fromJson(steps.create-issue-admin.outputs.outputs).number }}
ISSUE_URL: ${{ steps.create-issue-admin.outputs.outputs && fromJson(steps.create-issue-admin.outputs.outputs).url }}
run: |
echo "# issue の作成結果(Dressca-Admin)" >> $GITHUB_STEP_SUMMARY
if [ $STATUS = 'created' ]; then
echo "issue を新規作成しました。" >> $GITHUB_STEP_SUMMARY
elif [ $STATUS = 'updated' ]; then
echo "同名の issue が存在するため、更新のみ行いました。" >> $GITHUB_STEP_SUMMARY
else
echo "ステータスの値が不正です。" >> $GITHUB_STEP_SUMMARY
fi
echo issue number: $ISSUE_NUMBER >> $GITHUB_STEP_SUMMARY
echo status: $STATUS >> $GITHUB_STEP_SUMMARY
echo - $ISSUE_URL >> $GITHUB_STEP_SUMMARY
93 changes: 93 additions & 0 deletions .github/workflows/samples-dressca-admin-frontend.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---

name: dressca-admin-frontend CI

on:
pull_request:
branches: [main]
paths:
- 'samples/web-csr/dressca-frontend/*.*'
- 'samples/web-csr/dressca-frontend/admin/**'
- '.github/workflows/samples-dressca-admin-frontend.ci.yml'
workflow_dispatch:

defaults:
run:
working-directory: samples/web-csr/dressca-frontend/

jobs:
build:
name: Dressca 管理のフロントエンドアプリケーションのビルド
runs-on: ubuntu-latest
env:
NO_COLOR: "1" # 文字化け防止のためカラーコードを出力しない
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- uses: actions/cache@v4
id: node_modules_cache_id
env:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: node パッケージのキャッシュ確認
run: echo '${{ toJSON(steps.node_modules_cache_id.outputs) }}'

- name: node パッケージのインストール
if: ${{ steps.node_modules_cache_id.outputs.cache-hit != 'true' }}
run: npm ci

- id: run-lint
name: lintの実行
run: npm run lint:ci:admin >> /var/tmp/lint-result.txt 2>&1

- id: run-type-check
name: TypeScript の型チェック
run: npm run type-check:admin >> /var/tmp/type-check-result.txt 2>&1

- id: application-build
name: アプリケーションのビルド
run: npm run build-only:dev:admin >> /var/tmp/build-result.txt 2>&1

- id: run-unit-tests
name: 単体テストの実行
run: npm run test:unit:admin >> /var/tmp/unit-test-result.txt 2>&1

- name: lintの結果出力
if: ${{ success() || (failure() && steps.run-lint.conclusion == 'failure') }}
uses: ./.github/workflows/file-to-summary
with:
body: /var/tmp/lint-result.txt
header: 'lintの結果 :pen:'

- name: 型チェックの結果出力
if: ${{ success() || (failure() && steps.run-type-check.conclusion == 'failure') }}
uses: ./.github/workflows/file-to-summary
with:
body: /var/tmp/type-check-result.txt
header: '型チェックの結果 :pencil2:'

- name: ビルドの結果出力
if: ${{ success() || (failure() && steps.application-build.conclusion == 'failure') }}
uses: ./.github/workflows/file-to-summary
with:
body: /var/tmp/build-result.txt
header: 'ビルドの結果 :gear:'

- name: 単体テストの結果出力
if: ${{ success() || (failure() && steps.run-unit-tests.conclusion == 'failure') }}
uses: ./.github/workflows/file-to-summary
with:
body: /var/tmp/unit-test-result.txt
header: '単体テストの結果 :memo:'
17 changes: 14 additions & 3 deletions samples/web-csr/dressca-backend/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
"configurations": [
{
"type": "java",
"name": "Spring Boot-WebApplication<web>",
"name": "Spring Boot-WebApplication<consumer>",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"mainClass": "com.dressca.web.WebApplication",
"projectName": "web",
"mainClass": "com.dressca.web.consumer.WebApplication",
"projectName": "web-consumer",
"args": "",
"envFile": "${workspaceFolder}/.env"
},
{
"type": "java",
"name": "Spring Boot-WebApplication<admin>",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"mainClass": "com.dressca.web.admin.WebApplication",
"projectName": "web-admin",
"args": "",
"envFile": "${workspaceFolder}/.env"
},
Expand Down
Loading