From 0902fde19d5e8f902dcbf153970c61a6698aa316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 2 Apr 2024 19:04:24 +0200 Subject: [PATCH] Install Node packages before compiling assets in Gitlab CI The asset compilation was failing because it needs the packages that are installed with `npm clean-install`. We're now installing the Node packages after installing the gems, like we do in Github Actions. For this, we need to install the `npm` package. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d016aac0..956990901 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,13 +17,13 @@ tests: TEST_COVERAGE: 1 parallel: 5 script: - - apt-get update && apt-get install -y nodejs chromium + - apt-get update && apt-get install -y nodejs npm chromium - for i in config/*.example; do cp "$i" "${i/.example}"; done - for i in config/*.gitlab; do cp "$i" "${i/.gitlab}"; done - bundle --without development + - npm clean-install - bundle exec rake db:setup - bundle exec rake assets:precompile > /dev/null 2>&1 - - npm clean-install - bin/knapsack_pro_rspec artifacts: when: on_failure