Мне нужно проверить angular компоненты дротика в chrome. Тест должен быть выполнен в gitlab ci job. Как мне этого добиться?
Для этого вы можете:
Вот файл Docker:
FROM google/dart:2.5.0 USER root # Install deps + add Chrome Stable + purge all the things RUN apt-get update && apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg \ unzip \ zip \ --no-install-recommends \ && curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \ && echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \ && apt-get update && apt-get install -y \ google-chrome-stable \ --no-install-recommends \ && apt-get purge --auto-remove -y curl gnupg \ && rm -rf /var/lib/apt/lists/* WORKDIR / RUN mkdir chromedriver && cd chromedriver \ && wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip \ && unzip chromedriver_linux64.zip \ && rm chromedriver_linux64.zip \ && ln -s /usr/bin/google-chrome-stable /usr/bin/chrome ENV CHROME_DRIVER_PATH=/chromedriver/chromedriver
А вот работа:
build_web: stage: client_build image: registry.gitlab.com/your_org/your_proj/image_name script: - pub get - pub run build_runner test --fail-on-severe --define "build_web_compilers|entrypoint=compiler=dart2js" --delete-conflicting-outputs -- -p chrome - pub run build_runner build --define "build_web_compilers|entrypoint=compiler=dart2js" --delete-conflicting-outputs --output web:build only: - master