Running e2e tests on K8S environment
authorDavid Négrier <d.negrier@thecodingmachine.com>
Wed, 15 Apr 2020 21:54:55 +0000 (23:54 +0200)
committerDavid Négrier <d.negrier@thecodingmachine.com>
Wed, 15 Apr 2020 21:54:55 +0000 (23:54 +0200)
.github/workflows/build-and-deploy.yml
README.md

index 2b003230518c4451b09d2d7b11a96d36f62fa9b1..0f745b3650f5083af1509f4c56384ef1911c0378 100644 (file)
@@ -83,3 +83,18 @@ jobs:
         with:
           msg: Environment deployed at http://${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com
           check_for_duplicate_msg: true
+
+      - name: Run Cypress tests
+        uses: cypress-io/github-action@v1
+        with:
+          env: host=${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com,port=80
+          spec: cypress/integration/spec1.js
+          wait-on: http://${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com
+          working-directory: e2e
+
+      - name: "Upload the screenshot on test failure"
+        uses: actions/upload-artifact@v1
+        if: failure()
+        with:
+          name: "screenshot"
+          path: "./e2e/cypress/screenshots/spec.js/WorkAdventureGame -- loads (failed).png"
index d71c3f0bff46278923502618d72669e46f7e86d0..3d753c5e5b75a400eadf99a59d98143cb31670ef 100644 (file)
--- a/README.md
+++ b/README.md
@@ -98,4 +98,4 @@ Vagrant destroy
 * `Vagrant destroy`: delete your VM Vagrant.
 
 ## Features developed
-You have more details of features developed in back [README.md](./back/README.md).
\ No newline at end of file
+You have more details of features developed in back [README.md](./back/README.md).