Commit 1e8a4189 authored by Mike Greiling's avatar Mike Greiling

move webpack asset compilation to the setup-test-env stage

parent 7c47cc94
...@@ -24,8 +24,6 @@ before_script: ...@@ -24,8 +24,6 @@ before_script:
- '[ "$USE_BUNDLE_INSTALL" != "true" ] || retry bundle install --without postgres production --jobs $(nproc) $FLAGS' - '[ "$USE_BUNDLE_INSTALL" != "true" ] || retry bundle install --without postgres production --jobs $(nproc) $FLAGS'
- retry gem install knapsack - retry gem install knapsack
- '[ "$SETUP_DB" != "true" ] || bundle exec rake db:drop db:create db:schema:load db:migrate add_limits_mysql' - '[ "$SETUP_DB" != "true" ] || bundle exec rake db:drop db:create db:schema:load db:migrate add_limits_mysql'
- curl --silent --location https://deb.nodesource.com/setup_6.x | bash -
- apt-get install --assume-yes nodejs
- npm install - npm install
stages: stages:
...@@ -64,7 +62,6 @@ stages: ...@@ -64,7 +62,6 @@ stages:
<<: *dedicated-runner <<: *dedicated-runner
<<: *use-db <<: *use-db
script: script:
- bundle exec rake webpack:compile
- JOB_NAME=( $CI_BUILD_NAME ) - JOB_NAME=( $CI_BUILD_NAME )
- export CI_NODE_INDEX=${JOB_NAME[1]} - export CI_NODE_INDEX=${JOB_NAME[1]}
- export CI_NODE_TOTAL=${JOB_NAME[2]} - export CI_NODE_TOTAL=${JOB_NAME[2]}
...@@ -83,7 +80,6 @@ stages: ...@@ -83,7 +80,6 @@ stages:
<<: *dedicated-runner <<: *dedicated-runner
<<: *use-db <<: *use-db
script: script:
- bundle exec rake webpack:compile
- JOB_NAME=( $CI_BUILD_NAME ) - JOB_NAME=( $CI_BUILD_NAME )
- export CI_NODE_INDEX=${JOB_NAME[1]} - export CI_NODE_INDEX=${JOB_NAME[1]}
- export CI_NODE_TOTAL=${JOB_NAME[2]} - export CI_NODE_TOTAL=${JOB_NAME[2]}
...@@ -113,6 +109,7 @@ setup-test-env: ...@@ -113,6 +109,7 @@ setup-test-env:
<<: *dedicated-runner <<: *dedicated-runner
stage: prepare stage: prepare
script: script:
- bundle exec rake webpack:compile
- bundle exec rake assets:precompile 2>/dev/null - bundle exec rake assets:precompile 2>/dev/null
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init' - bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
artifacts: artifacts:
...@@ -381,6 +378,8 @@ lint:javascript: ...@@ -381,6 +378,8 @@ lint:javascript:
- node_modules/ - node_modules/
stage: test stage: test
image: "node:7.1" image: "node:7.1"
before_script:
- npm install
script: script:
- npm --silent run eslint - npm --silent run eslint
...@@ -391,6 +390,8 @@ lint:javascript:report: ...@@ -391,6 +390,8 @@ lint:javascript:report:
- node_modules/ - node_modules/
stage: post-test stage: post-test
image: "node:7.1" image: "node:7.1"
before_script:
- npm install
script: script:
- find app/ spec/ -name '*.js' -or -name '*.js.es6' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files - find app/ spec/ -name '*.js' -or -name '*.js.es6' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files
- npm --silent run eslint-report || true # ignore exit code - npm --silent run eslint-report || true # ignore exit code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment