diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6777a1e4f..3e6966677 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -45,6 +45,7 @@ jobs: env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} VITEST_COVERAGE: true + CYPRESS_COMMIT: ${{ github.sha }} - name: Upload Coverage to Codecov uses: codecov/codecov-action@v3 # Run step only pushes to develop and pull_requests diff --git a/cypress/helpers/util.ts b/cypress/helpers/util.ts index e2c330f61..2e9254e6a 100644 --- a/cypress/helpers/util.ts +++ b/cypress/helpers/util.ts @@ -16,7 +16,7 @@ const utf8ToB64 = (str: string): string => { return window.btoa(decodeURIComponent(encodeURIComponent(str))); }; -const batchId: string = 'mermaid-batch' + new Date().getTime(); +const batchId: string = 'mermaid-batch-' + Cypress.env('CYPRESS_COMMIT') || Date.now().toString(); export const mermaidUrl = ( graphStr: string,