From 8ac7c45be6fec1c82635a528361a0eb3fcf7f3a0 Mon Sep 17 00:00:00 2001 From: pjarugula Date: Thu, 21 Dec 2023 11:43:49 +0530 Subject: [PATCH] refactor: Create yaml file to trigger e2e test --- .../roles/configure/tasks/main.yml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 test/deploy/onboarding-tests/roles/configure/tasks/main.yml diff --git a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml new file mode 100644 index 000000000..c773c4fdf --- /dev/null +++ b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml @@ -0,0 +1,38 @@ +--- +- debug: + msg: Tests E2E + +- name: Clone the Onboarding tests repository + git: + repo: https://github.com/newrelic/onboarding-e2e-tests.git + dest: /home/user/ +become: yes + +- name: Write Permissions for repo + shell: "chmod 755 onboarding-e2e-tests" + become: yes + +- name: Trigger Onboarding tests + shell: "cd onboarding-e2e-tests" + become: yes + +- name: Create env file + shell: "touch .env" + become: yes + +- name: Store values in env file + shell: "echo -e ENV_SECRET_EMAIL='${ENV_SECRET_EMAIL}' \nENV_SECRET_PASSWORD='${ENV_SECRET_PASSWORD}' > .env" + become: yes + +- name: npm install + shell: "npm install" + become: yes + +- name: Install Playwright + shell: "npx playwright@1.32.0 install --with-deps chromium" + become: yes + +- name: Test playwright scripts + shell: "npx playwright test" + become: yes +