From d686fcc15f7758989ad9c01e8b968c9c481720f2 Mon Sep 17 00:00:00 2001 From: Danie Humphreys Date: Wed, 11 Sep 2024 12:23:10 +0100 Subject: [PATCH] Add job to run e2e tests on feature branch. --- .circleci/config.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ad9d76e58..e0b3b9a4e8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -122,6 +122,35 @@ jobs: root: . paths: - docker_cache + run_cas3_e2e_tests: + executor: + name: unit-test-gradle + steps: + - checkout: + path: ./hmpps-approved-premises-api + - run: + name: Install and set Linuxbrew + command: | + sudo apt-get install build-essential curl file git + sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" + echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:$PATH"' >> $BASH_ENV + echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >> $BASH_ENV + echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >> $BASH_ENV + - run: + name: "Install dependencies" + command: | + brew install node nodenv + - run: + name: Clone ap-tools and UI + command: | + git clone https://github.com/ministryofjustice/hmpps-approved-premises-tools.git + git clone https://github.com/ministryofjustice/hmpps-temporary-accommodation-ui.git + export LOCAL_CAS_API_PATH=/home/circleci/project/hmpps-approved-premises-api + export LOCAL_CAS_UI_PATH=/home/circleci/project/hmpps-temporary-accommodation-ui + chmod +x ./hmpps-temporary-accommodation-ui/script/setup + ./hmpps-temporary-accommodation-ui/script/setup + printenv + ls build: environment: _JAVA_OPTIONS: "-Xmx3g" @@ -352,6 +381,7 @@ workflows: version: 2 build-test-and-deploy: jobs: + - run_cas3_e2e_tests - build - code_linting_check_with_ktlint: requires: