From 43bf49711f9c608acae9112be3943b75be39ba74 Mon Sep 17 00:00:00 2001 From: Pil0tXia Date: Tue, 11 Jun 2024 21:57:38 +0800 Subject: [PATCH] [ISSUE #156] Support Continuous Integration for Frontend (#157) * Support Continuous Integration for Frontend * No need to automatically upgrade front-end dependencies --- .github/dependabot.yml | 2 +- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a6fcca82..41c3bde9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -27,7 +27,7 @@ updates: update-types: [ "version-update:semver-major" ] - package-ecosystem: "npm" directory: "./eventmesh-dashboard-view" - # Disable front-end PRs temporarily since 'npm run build' fails + # No need to automatically upgrade front-end dependencies open-pull-requests-limit: 0 schedule: interval: "monthly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68a92f7c..904b3254 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,8 @@ on: branches: [ '**' ] jobs: - build: - name: Build + build-be: + name: Build Backend strategy: fail-fast: false matrix: @@ -113,3 +113,32 @@ jobs: - name: Run Unit Tests run: ./mvnw -B test --file pom.xml + + build-fe: + name: Build Frontend + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: npm install --legacy-peer-deps + working-directory: ./eventmesh-dashboard-view + + - name: Build + run: npm run build + working-directory: ./eventmesh-dashboard-view + +# - name: Run tests +# run: npm test +# working-directory: ./eventmesh-dashboard-view