test: added e2e tests for get credentials #2977
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E tests | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "example/**" | |
- "packages/**" | |
- ".github/**" | |
- "cypress/**" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "example/**" | |
- "packages/**" | |
- ".github/**" | |
- "cypress/**" | |
jobs: | |
smoke_tests: | |
container: | |
image: cypress/browsers:node-20.14.0-chrome-126.0.6478.114-1-ff-127.0.1-edge-126.0.2592.61-1 | |
options: --user root | |
runs-on: self-hosted | |
steps: | |
- name: id | |
run: id | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - name: Set up Node.js | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: '20' | |
# - name: Install Yarn | |
# run: npm install -g yarn | |
# - name: Set up Node.js | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: '20' | |
# cache: 'yarn' | |
# cache-dependency-path: './yarn.lock' | |
- name: Add hosts to /etc/hosts | |
run: | | |
sudo echo "127.0.0.1 localhost.corp.adobe.com" | sudo tee -a /etc/hosts | |
- name: 'Create env file' | |
run: | | |
touch ./example/.env | |
echo GATSBY_IMS_SRC="https://auth-stg1.services.adobe.com/imslib/imslib.min.js" >> ./example/.env | |
echo GATSBY_IMS_CONFIG='{"client_id": "stage_adobe_io", "scope": "AdobeID,openid,unified_dev_portal,read_organizations,additional_info.projectedProductContext,additional_info.roles,gnav,read_pc.dma_bullseye,creative_sdk,adobeio_api,service_principals.read,service_principals.write,read_client_secret", "environment": "stg1"}' >> ./example/.env | |
cat ./example/.env | |
- name: Run Tests | |
uses: cypress-io/github-action@v5 | |
with: | |
build: yarn build | |
start: yarn dev:https | |
wait-on: 'https://localhost.corp.adobe.com:9000' | |
browser: chrome | |
config-file: cypress.config.js | |
spec: | | |
cypress/e2e/smoke.cy.js | |
cypress/e2e/get-credentials.cy.js | |
env: | |
NODE_TLS_REJECT_UNAUTHORIZED: '0' |