/e2e-ci-tests

E2E CI tests using Github actions

Primary LanguageTypeScript

Setup E2E Tests in Github CI

There are two workflows in this project.

  • first-widget.yml
  • second-widget.yml

Both workflows consists of 2 jobs:

Running locally

  1. Build the image

    docker build -t <Your Repository URL>/e2e-test .
  2. Run the tests

    Chromium

    docker run -it -v $PWD:/usr/src/app --network sample headless-browsers-node-14 sh -c "yarn && npm run test:e2e:ci-chromium"

    Firefox

    docker run -it -v $PWD:/usr/src/app --network sample headless-browsers-node-14 sh -c "yarn && npm run test:e2e:ci-firefox"
  3. Push to Repository in Artifact Registry from local machine.

    • Login to your registory
    cat cloud-account-secret-key.json | docker login ghcr.io -u _json_key --password-stdin 

    cloud-account-secret-key.json should be the Service account key file.

    Refer to Step 4 in the documentation on setting up repository in Artifact Registry on how to create this file.

    • Push to the repository
    docker push <Your Repository URL>/e2e-test