| Index: .gitlab-ci.yml |
| diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml |
| index 4109a810e68940c367cffb763069bc325ebf23d2..df3e971cdd9042c5023013b141e3af8d4a00765d 100644 |
| --- a/.gitlab-ci.yml |
| +++ b/.gitlab-ci.yml |
| @@ -14,12 +14,47 @@ |
| # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| stages: |
| - - test_ext |
| + - prepare |
| + - test |
| -qunit:gecko: |
| - stage: test_ext |
| - script: |
| +.dependencies: |
|
tlucas
2018/09/03 21:35:54
I noticed that i only cache nodejs and adblockplus
|
| + script: &dependencies |
| - mkdir -p .git/info |
| - pip install --user Jinja2 cryptography |
| - - npm install |
| - - npm test |
| + - python ensure_dependencies.py |
| + - if [ ! -d "node_modules" ]; then npm install; fi |
|
Sebastian Noack
2018/09/03 21:57:47
This could be done simpler:
[ -d node_modules ]
tlucas
2018/09/04 07:19:37
Done.
|
| + |
| +prepare-dependencies: |
| + stage: prepare |
| + script: *dependencies |
| + cache: |
| + key: cache_$CI_COMMIT_SHA |
| + paths: |
| + - ./ |
| + policy: push |
| + |
| + |
| +.test_template: &test_template |
| + stage: test |
| + before_script: *dependencies |
| + cache: |
| + key: cache_$CI_COMMIT_SHA |
| + paths: |
| + - ./ |
| + policy: pull |
| + |
| + |
| +tests:gecko: |
| + <<: *test_template |
| + script: |
| + - npm test -- -g gecko |
| + |
| +tests:chrome: |
| + <<: *test_template |
| + script: |
| + - xvfb-run npm test -- -g chrome |
| + |
| +lint: |
| + <<: *test_template |
| + script: |
| + - npm run lint |