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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user