Skip to content

Commit

Permalink
Create yaml file to clone and run onboarding e2e tests (#1006)
Browse files Browse the repository at this point in the history
* refactor: Create yaml file to trigger E2E Tests

* refactor: Change format in yaml file

* Delete test/deploy/onboarding-tests/roles/configure/tasks/package-lock.json

---------

Co-authored-by: pjarugula <pjarugula.newrelic.com>
  • Loading branch information
pjarugula authored Jan 16, 2024
1 parent 75e2fd2 commit 3ee4aa1
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions test/deploy/onboarding-tests/roles/configure/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
- debug:
msg: Tests E2E

- name: Create directory
shell: "mkdir -p ~/tests && chmod 777 ~/tests"

- name: Clone the Onboarding tests repository
git:
repo: https://github.com/newrelic/onboarding-e2e-tests.git
dest: ~/tests/onboarding-e2e-tests

- name: Change directory for Onboarding tests
shell: "cd ~/tests/onboarding-e2e-tests && pwd"

- name: Create env file
shell: "touch ~/tests/onboarding-e2e-tests/.env"

- name: Store values in env file
shell: |
echo "ENV_SECRET_EMAIL='[email protected]' \nENV_SECRET_PASSWORD='example'" >> ~/tests/onboarding-e2e-tests/.env
- name: Write Permissions for repo
shell: "chmod 755 ~/tests/onboarding-e2e-tests"

- name: npm install
shell: "npm install"
args:
chdir: ~/tests/onboarding-e2e-tests

- name: Install Playwright
shell: "npx [email protected] install --with-deps chromium"
args:
chdir: ~/tests/onboarding-e2e-tests

- name: Test playwright scripts
shell: "npx playwright test"
args:
chdir: ~/tests/onboarding-e2e-tests

0 comments on commit 3ee4aa1

Please sign in to comment.