Allow running the whole project using npm #10249
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: Build Frontend | |
| on: | |
| pull_request: | |
| paths: | |
| - "frontend/**" | |
| - "Makefile" | |
| - ".github/**" | |
| - "app/**" | |
| - "plugins/**" | |
| push: | |
| branches: | |
| - main | |
| - rc-* | |
| - testing-rc-* | |
| paths: | |
| - "frontend/**" | |
| - Makefile | |
| - ".github/**" | |
| - "app/**" | |
| - "plugins/**" | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: lint | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: | | |
| package-lock.json | |
| frontend/package-lock.json | |
| - name: Install dependencies | |
| run: | | |
| npm run frontend:install | |
| - name: Run linter | |
| run: | | |
| npm run frontend:lint | |
| test: | |
| name: test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: | | |
| package-lock.json | |
| frontend/package-lock.json | |
| - name: Install dependencies | |
| run: | | |
| npm run frontend:install | |
| - name: Run tests | |
| run: | | |
| npm run frontend:test | |
| - name: Run frontend-i18n-check | |
| run: | | |
| npm run i18n:check | |
| build: | |
| name: build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: | | |
| package-lock.json | |
| frontend/package-lock.json | |
| - name: Install dependencies | |
| run: | | |
| npm run frontend:install | |
| - name: Build Frontend | |
| run: | | |
| npm run frontend:build | |
| testplugins: | |
| name: test plugins | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: | | |
| package-lock.json | |
| frontend/package-lock.json | |
| - name: Install dependencies | |
| run: | | |
| npm install | |
| - name: Test plugins | |
| run: | | |
| npm run plugins:test | |
| builddocs: | |
| name: build docs | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: | | |
| package-lock.json | |
| frontend/package-lock.json | |
| - name: Install dependencies | |
| run: | | |
| npm run frontend:install | |
| - name: Build docs | |
| run: | | |
| echo "Docs build temporarily disabled due to TypeDoc compatibility issues" | |
| # npm run docs | |
| buildstorybook: | |
| name: build storybook | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: | | |
| package-lock.json | |
| frontend/package-lock.json | |
| - name: Install dependencies | |
| run: | | |
| npm run frontend:install | |
| - name: Build storybook | |
| run: | | |
| npm run frontend:build:storybook |