Skip to content

Commit

Permalink
Merge pull request #1601 from aziontech/dev
Browse files Browse the repository at this point in the history
DEPLOY 2024.08.09
  • Loading branch information
vinigfer authored Aug 9, 2024
2 parents 08fc4e6 + bd4d665 commit 5d970d1
Show file tree
Hide file tree
Showing 113 changed files with 391 additions and 201 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ jobs:
env:
VITE_STRIPE_TOKEN_PROD: ${{ secrets.PROD_STRIPE_TOKEN }}
VITE_RECAPTCHA_SITE_KEY: ${{ secrets.PROD_RECAPTCHA_SITE_KEY }}
VITE_SEGMENT_TOKEN: ${{ secrets.PROD_SEGMENT_TOKEN }}
NODE_ENV: production
VITE_ENVIRONMENT: production
1 change: 1 addition & 0 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ jobs:
env:
VITE_STRIPE_TOKEN_STAGE: ${{ secrets.STAGE_STRIPE_TOKEN }}
VITE_RECAPTCHA_SITE_KEY: ${{ secrets.STAGE_RECAPTCHA_SITE_KEY }}
VITE_SEGMENT_TOKEN: ${{ secrets.STAGE_SEGMENT_TOKEN }}
NODE_ENV: stage
VITE_ENVIRONMENT: stage
93 changes: 69 additions & 24 deletions .github/workflows/dev-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ jobs:
run-dev-e2e-tests:
name: Run Dev E2E Tests
runs-on: ubuntu-latest
strategy:
matrix:
group: [2,3,4,5,6,7]
steps:
- uses: actions/checkout@v3

- name: Setup Node.js Environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Run Cypress E2E Tests
- name: Run Cypress Tests
uses: cypress-io/github-action@v6
env:
DEV_CYPRESS_EMAIL: ${{ secrets.DEV_CYPRESS_EMAIL }}
Expand All @@ -30,38 +33,80 @@ jobs:
browser: chrome
wait-on: 'http://localhost:5173/'
wait-on-timeout: 120
env: grepTags=@dev+-@xfail
env: grepTags=@dev${{ matrix.group }}+-@xfail

- name: Check E2E Test Coverage
if: ${{ always() }}
run: node ./scripts/check_coverage.js ./coverage/e2e/lcov.info 20

- name: Compress E2E Coverage Reports
if: ${{ always() }}
run: |
rm -rf coverage/e2e/lcov-report
zip -r coverage.zip coverage
- name: Upload E2E Coverage Report Artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: coverage_e2e_report
path: coverage.zip
retention-days: 7
- name: Move Coverage Files
run: mv .nyc_output/out.json .nyc_output/out_${{ matrix.group }}.json

- name: Upload Cypress Screenshots Artifact
- name: Upload Cypress Screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: cypress_screenshots
name: cypress_screenshots_${{ matrix.group }}
path: cypress/screenshots
retention-days: 4

- name: Upload Cypress Videos Artifact
- name: Upload Cypress Videos
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: cypress_videos
name: cypress_videos_${{ matrix.group }}
path: cypress/videos
retention-days: 1

- name: Upload Coverage Files
uses: actions/upload-artifact@v3
with:
name: coverage_reportx
path: .nyc_output/*
retention-days: 1

download_and_merge:
name: Download and Merge Coverage Reports
needs: run-dev-e2e-tests
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Dependencies
run: npm install --global nyc

- name: Download Coverage Artifacts
uses: actions/download-artifact@v3
with:
path: coverage_report

- name: Merge Coverage Reports
run: npx nyc merge ./coverage_report/coverage_reportx .nyc_output/out.json

- name: Generate Text Coverage Report
run: npx nyc report --reporter=text-summary

- name: Generate HTML Coverage Report
run: npx nyc report --reporter=html --report-dir=./coverage/e2e

- name: Generate LCOV Report
run: npx nyc report --reporter=lcovonly --report-dir=./coverage/e2e

- name: Check E2E Test Coverage
if: ${{ always() }}
run: node ./scripts/check_coverage.js ./coverage/e2e/lcov.info 20

- name: Compress Coverage Reports
if: ${{ always() }}
run: zip -r coverage.zip coverage

- name: Upload Coverage Report Artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: coverage_e2e_report
path: coverage.zip
retention-days: 7
2 changes: 1 addition & 1 deletion cypress/e2e/account-settings/update-account-settings.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const fixtures = {
complement: 'Apt. 123'
}

describe('Account Settings spec', { tags: ['@dev', '@xfail'] }, () => {
describe('Account Settings spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Account Settings')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/account-settings/update-address.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const fixtures = {
complement: 'Apt. 123'
}

describe('Account Settings spec', { tags: ['@dev', '@xfail'] }, () => {
describe('Account Settings spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Account Settings')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/account-settings/update-billing-email.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const fixtures = {
complement: 'Apt. 123'
}

describe('Account Settings spec', { tags: ['@dev', '@xfail'] }, () => {
describe('Account Settings spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Account Settings')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/billing/add-credit.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { generateUniqueNameWithLetters } from '../../support/utils'

let cardHolderName

describe('Payment Methods spec', { tags: ['@xfail'] }, () => {
describe('Payment Methods spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
cy.intercept('GET', '/api/v4/payments/*').as('getPaymentMethodsApi')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/billing/create-payment-method.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { generateUniqueNameWithLetters } from '../../support/utils'

let cardHolderName

describe('Payment Methods spec', { tags: ['@xfail'] }, () => {
describe('Payment Methods spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
cy.intercept('GET', '/api/v4/payments/*').as('getPaymentMethodsApi')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/billing/delete-default-payment-method.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { generateUniqueNameWithLetters } from '../../support/utils'

let cardHolderName

describe('Payment Methods spec', { tags: ['@xfail'] }, () => {
describe('Payment Methods spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
cy.intercept('GET', '/api/v4/payments/*').as('getPaymentMethodsApi')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/credentials/create-credentials.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

const credentialName = generateUniqueName('Credential')

describe('Credentials spec', { tags: ['@dev'] }, () => {
describe('Credentials spec', { tags: ['@dev2'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Credentials')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/data-stream/create-data-stream-bigquery.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/data-stream/create-data-stream-datadog.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev2', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/data-stream/create-data-stream-ibmqradar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev3', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/data-stream/create-data-stream-kafka.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev3', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/data-stream/create-data-stream-s3.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev3', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/data-stream/create-data-stream-splunk.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev3', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/data-stream/create-data-stream-standard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import selectors from '../../support/selectors'

let dataStreamName

describe('Data Stream spec', { tags: ['@xfail'] }, () => {
describe('Data Stream spec', { tags: ['@dev3', '@xfail'] }, () => {
beforeEach(() => {
dataStreamName = generateUniqueName('DataStream')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

const digitalCertificateName = generateUniqueName('CertificateName')

describe('Digital Certificates spec', () => {
describe('Digital Certificates spec', { tags: ['@dev3', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Digital Certificates')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import selectors from '../../support/selectors'

const digitalCertificateName = generateUniqueName('CertificateName')

describe('Digital Certificates spec', () => {
describe('Digital Certificates spec', { tags: ['@dev3'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Digital Certificates')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import fixtures from '../../fixtures/digital-certificates'

const digitalCertificateName = generateUniqueName('CertificateName')

describe('Digital Certificates spec', () => {
describe('Digital Certificates spec', { tags: ['@dev3'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Digital Certificates')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import fixtures from '../../fixtures/digital-certificates'

const digitalCertificateName = generateUniqueName('CertificateName')

describe('Digital Certificates spec', () => {
describe('Digital Certificates spec', { tags: ['@dev3'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Digital Certificates')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/domains/create-domain-edge-application.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const createEdgeApplicationCase = () => {
cy.get(selectors.domains.pageTitle(edgeAppName)).should('have.text', edgeAppName)
}

describe('Domains spec', () => {
describe('Domains spec', { tags: ['@dev3'] }, () => {
beforeEach(() => {
cy.login()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/domains/create-domain-lets-encrypt.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const createEdgeApplicationCase = () => {
cy.get(selectors.domains.pageTitle(edgeAppName)).should('have.text', edgeAppName)
}

describe('Domains spec', () => {
describe('Domains spec', { tags: ['@dev3', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/domains/create-domain-mtls.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const createEdgeApplicationCase = () => {
cy.get(selectors.domains.pageTitle(edgeAppName)).should('have.text', edgeAppName)
}

describe('Domains spec', { tags: ['@xfail'] }, () => {
describe('Domains spec', { tags: ['@dev3', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/domains/edit-domain.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const createEdgeApplicationCase = () => {
cy.get(selectors.domains.pageTitle(edgeAppName)).should('have.text', edgeAppName)
}

describe('Domains spec', { tags: ['@xfail'] }, () => {
describe('Domains spec', { tags: ['@dev3', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/edge-application/add-error-response.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const createEdgeApplicationCase = () => {
cy.get(selectors.list.filteredRow.column('name')).click()
}

describe('Edge Application', { tags: ['@dev'] }, () => {
describe('Edge Application', { tags: ['@dev4'] }, () => {
beforeEach(() => {
fixtures.edgeApplicationName = generateUniqueName('EdgeApp')
// Login
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/edge-application/add-origin.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const createEdgeApplicationCase = () => {
cy.get(selectors.list.filteredRow.column('name')).click()
}

describe('Edge Application', { tags: ['@dev'] }, () => {
describe('Edge Application', { tags: ['@dev4'] }, () => {
beforeEach(() => {
fixtures.edgeApplicationName = generateUniqueName('EdgeApp')
// Login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const createEdgeApplicationCase = () => {
cy.get(selectors.list.filteredRow.column('name')).click()
}

describe('Edge Application', { tags: ['@dev', '@xfail'] }, () => {
describe('Edge Application', { tags: ['@dev4', '@xfail'] }, () => {
beforeEach(() => {
fixtures.edgeApplicationName = generateUniqueName('EdgeApp')
// Login
Expand Down
Loading

0 comments on commit 5d970d1

Please sign in to comment.