Tighten engines and devEngines
#487
Workflow file for this run
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 | |
| on: [ pull_request ] | |
| env: | |
| NODE_ACTIVE_LTS_VERSION: 24 | |
| NODE_PREVIOUS_LTS_VERSION: 22 | |
| NPM_VERSION: 11 | |
| jobs: | |
| prepare_env: | |
| name: Prepare environment | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| NODE_ACTIVE_LTS_VERSION: ${{ env.NODE_ACTIVE_LTS_VERSION }} | |
| NODE_PREVIOUS_LTS_VERSION: ${{ env.NODE_PREVIOUS_LTS_VERSION }} | |
| NPM_VERSION: ${{ env.NPM_VERSION }} | |
| steps: | |
| - name: Compute outputs | |
| run: | | |
| echo "NODE_ACTIVE_LTS_VERSION=${{ env.NODE_ACTIVE_LTS_VERSION }}" >> $GITHUB_OUTPUT | |
| echo "NODE_PREVIOUS_LTS_VERSION=${{ env.NODE_PREVIOUS_LTS_VERSION }}" >> $GITHUB_OUTPUT | |
| echo "NPM_VERSION=${{ env.NPM_VERSION }}" >> $GITHUB_OUTPUT | |
| build: | |
| name: Build distribution CSS and JS | |
| runs-on: ubuntu-24.04 | |
| needs: prepare_env | |
| strategy: | |
| matrix: | |
| node: | |
| - ${{ needs.prepare_env.outputs.NODE_ACTIVE_LTS_VERSION }} | |
| - ${{ needs.prepare_env.outputs.NODE_PREVIOUS_LTS_VERSION }} | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v6 | |
| # Perform this step for Node.js active LTS version | |
| - name: Set up Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| if: matrix.node == env.NODE_ACTIVE_LTS_VERSION | |
| # Perform this step for Node.js previous LTS version | |
| # Continue on error to avoid failing the whole job if npm version is incompatible | |
| - name: Set up Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| if: matrix.node == env.NODE_PREVIOUS_LTS_VERSION | |
| continue-on-error: true | |
| # Perform this step for Node.js previous LTS version | |
| - name: Install npm@${{ env.NPM_VERSION }} for Node.js ${{ matrix.node }} | |
| run: npm install -g npm@${{ env.NPM_VERSION }} | |
| - name: Print Node.js and npm version | |
| run: node --version && npm --version | |
| - name: Install | |
| run: npm ci | |
| - name: Build | |
| run: npm run build |