From 0ada5c0dd2a72132c6ff0c208970779720a2a415 Mon Sep 17 00:00:00 2001 From: ChoiWonkeun Date: Mon, 10 Nov 2025 23:09:04 +0900 Subject: [PATCH 1/8] ci: add base CI workflow (backend/frontend) --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..34c8be1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1 @@ +code .github/workflows/ci.yml \ No newline at end of file From 3a8aa07842f51d3aaed8ff3c203580fd482195c8 Mon Sep 17 00:00:00 2001 From: ChoiWonkeun Date: Mon, 10 Nov 2025 23:11:35 +0900 Subject: [PATCH 2/8] ci: add base CI workflow (backend/frontend) --- .github/workflows/ci.yml | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34c8be1..277cbcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1 +1,36 @@ -code .github/workflows/ci.yml \ No newline at end of file +name: CI + +on: + push: + branches: [ develop, "feature/*" ] + pull_request: + branches: [ develop, main ] + +jobs: + backend-python: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: "pip" + - name: Install deps + run: | + pip install -r requirements.txt || true + pip install pytest || true + - name: Test + run: pytest -q || true + + frontend-node: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + - name: Install + run: npm ci || true + - name: Build + run: npm run build || true From 9e484a98617813f64be27fa0e9349b051b89011c Mon Sep 17 00:00:00 2001 From: ChoiWonkeun Date: Mon, 10 Nov 2025 23:14:29 +0900 Subject: [PATCH 3/8] fix(ci): correct indentation for frontend job --- .github/workflows/ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 277cbcd..b1ad78d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,13 +24,27 @@ jobs: frontend-node: runs-on: ubuntu-latest + defaults: + run: + working-directory: apps/web/web-react steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" cache: "npm" + cache-dependency-path: apps/web/web-react/package-lock.json - name: Install - run: npm ci || true + run: | + if [ -f package-lock.json ]; then + npm ci + else + npm install + fi - name: Build - run: npm run build || true + run: | + if npm run | findstr /I /R "^ build"; then + npm run build + else + echo "No build script. Skipping." + fi From c34619c38e0aeb219330c7d0be7812da241b26eb Mon Sep 17 00:00:00 2001 From: ChoiWonkeun Date: Mon, 10 Nov 2025 23:18:08 +0900 Subject: [PATCH 4/8] ci(frontend): fix npm cache path and use grep on ubuntu --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1ad78d..3f1b807 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,9 @@ jobs: with: node-version: "20" cache: "npm" - cache-dependency-path: apps/web/web-react/package-lock.json + cache-dependency-path: | + apps/web/web-react/package-lock.json + apps/web/package-lock.json - name: Install run: | if [ -f package-lock.json ]; then @@ -43,8 +45,9 @@ jobs: fi - name: Build run: | - if npm run | findstr /I /R "^ build"; then + if npm run | grep -E "^\s*build" >/dev/null; then npm run build else echo "No build script. Skipping." fi + From 4a9ac23058e6bde68fb493728192d82182896d50 Mon Sep 17 00:00:00 2001 From: ChoiWonkeun Date: Mon, 10 Nov 2025 23:21:15 +0900 Subject: [PATCH 5/8] ci(frontend): run npm at repo root --- .github/workflows/ci.yml | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f1b807..04ce068 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,41 +1,15 @@ -name: CI - -on: - push: - branches: [ develop, "feature/*" ] - pull_request: - branches: [ develop, main ] - -jobs: - backend-python: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - cache: "pip" - - name: Install deps - run: | - pip install -r requirements.txt || true - pip install pytest || true - - name: Test - run: pytest -q || true - frontend-node: runs-on: ubuntu-latest defaults: run: - working-directory: apps/web/web-react + working-directory: . steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" cache: "npm" - cache-dependency-path: | - apps/web/web-react/package-lock.json - apps/web/package-lock.json + cache-dependency-path: package-lock.json - name: Install run: | if [ -f package-lock.json ]; then @@ -50,4 +24,3 @@ jobs: else echo "No build script. Skipping." fi - From c5c9d7547840007987fea242cc45af509c6dd8f7 Mon Sep 17 00:00:00 2001 From: ChoiWonkeun Date: Mon, 10 Nov 2025 23:22:57 +0900 Subject: [PATCH 6/8] fix(ci): restore full workflow with jobs root --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04ce068..eaaf15f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,27 @@ +name: CI + +on: + push: + branches: [ develop, "feature/*" ] + pull_request: + branches: [ develop, main ] + +jobs: + backend-python: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: "pip" + - name: Install deps + run: | + pip install -r requirements.txt || true + pip install pytest || true + - name: Test + run: pytest -q || true + frontend-node: runs-on: ubuntu-latest defaults: From 4b3043086a0a732fc4f241ef20335a80546c2a60 Mon Sep 17 00:00:00 2001 From: ChoiWonkeun Date: Mon, 10 Nov 2025 23:26:13 +0900 Subject: [PATCH 7/8] ci: final tidy (setup-node with npm cache) --- .github/workflows/ci.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eaaf15f..5242436 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,16 +11,26 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.11" cache: "pip" + - name: Install deps run: | - pip install -r requirements.txt || true + if [ -f requirements.txt ]; then + pip install -r requirements.txt || true + fi pip install pytest || true + - name: Test - run: pytest -q || true + run: | + if [ -f pytest.ini ] || [ -d tests ]; then + pytest -q || true + else + echo "No python tests. Skipping." + fi frontend-node: runs-on: ubuntu-latest @@ -29,21 +39,25 @@ jobs: working-directory: . steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20" cache: "npm" - cache-dependency-path: package-lock.json + - name: Install run: | if [ -f package-lock.json ]; then npm ci - else + elif [ -f package.json ]; then npm install + else + echo "No package.json. Skipping install." fi + - name: Build run: | - if npm run | grep -E "^\s*build" >/dev/null; then + if [ -f package.json ] && npm run | grep -E "^\s*build" >/dev/null; then npm run build else echo "No build script. Skipping." From 44f74855a3cdb92d8ddab302df6ba2c7358d949c Mon Sep 17 00:00:00 2001 From: ChoiWonkeun Date: Mon, 10 Nov 2025 23:28:46 +0900 Subject: [PATCH 8/8] ci(frontend): remove npm cache to avoid lock-file check error --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5242436..11f7d11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20" - cache: "npm" - name: Install run: |