diff --git a/.github/workflows/foreman.yml b/.github/workflows/foreman.yml index d21128625c8..b5dbfb70f59 100644 --- a/.github/workflows/foreman.yml +++ b/.github/workflows/foreman.yml @@ -68,6 +68,7 @@ jobs: - 'test:units' - 'test:functionals' - 'test:graphql' + - 'webpack:compile test:integration' steps: - run: sudo apt-get update - run: sudo apt-get -qq -y install build-essential libcurl4-openssl-dev zlib1g-dev libpq-dev libvirt-dev @@ -87,6 +88,26 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + - name: Setup NPM Cache + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package.json') }} + restore-keys: | + ${{ runner.os }}-node-${{ matrix.node }}- + if: contains(matrix.task, 'compile') + - name: Generate package-lock.json + run: npm install --package-lock-only --no-audit + if: contains(matrix.task, 'compile') + - name: Archive package-lock.json + uses: actions/upload-artifact@v3 + with: + name: package-lock-ruby-${{ matrix.ruby }}-node-${{ matrix.node }}-pg-${{ matrix.postgresql }}.json + path: package-lock.json + if: contains(matrix.task, 'compile') + - name: Install NPM packages + run: npm ci --no-audit + if: contains(matrix.task, 'compile') - name: Prepare test env run: | bundle exec rake db:create