This is the config.yml that I’m using
version: 2
parameters:
run_integration_tests:
type: boolean
default: false
environment:
type: string
default: techcrunch.com
defaults: &defaults
working_directory: ~/techcrunch-2017
docker:
- image: circleci/php:apache-node-browsers
jobs:
build:
<<: *defaults
steps:
- checkout
# Set the host
- run:
name: Setup hosts
command: echo 127.0.0.1 local.techcrunch.com | sudo tee -a /etc/hosts
# Get latest master
- run:
name: Get latest version of the code
command: |
git checkout master
git fetch
git reset --hard origin/master
git checkout $CIRCLE_BRANCH
# Production build
- run:
name: Start editor blocks production build
command: |
cd ~/techcrunch-2017/plugins/tc-blocks
npm run build
- run:
name: Run ESLint on editor blocks plugin
command: |
cd ~/techcrunch-2017/plugins/tc-blocks
node_modules/eslint/bin/eslint.js --color --max-warnings=0 .
selenium_tests:
docker:
- image: circleci/openjdk:8-jdk-stretch-browsers
environment:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx3200m
steps:
- checkout
- run: mkdir test-reports
- run:
name: Download Selenium
command: |
curl -O http://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar
- run:
name: Start Selenium
command: |
java -jar selenium-server-standalone-3.5.3.jar -log test-reports/selenium.log
background: true
- run: mvn dependency:go-offline
- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}
# run tests!
- run: mvn integration-test -Denv=<< pipeline.parameters.environment >>
- run:
name: Save test results
command: |
mkdir -p ~/testng/results/
find . -type f -regex "./extent-reports" -exec cp {} ~/testng/results/ \;
when: always
- store_test_results:
path: ~/testng/results/
- store_artifacts:
path: ~/testng/results/
- store_artifacts:
path: testng/results/
workflows:
version: 2
integration_tests:
jobs:
- build
- selenium_tests
But I get this error when it’s building