From 37d516e35384fd0a1d22601d05fadff39def9ecf Mon Sep 17 00:00:00 2001 From: Dmytro Bykov Date: Thu, 30 May 2024 10:38:44 +0200 Subject: [PATCH] updated config --- .github/workflows/ci.yml | 21 ++++++++++++++++----- cypress-e2e/cypress.config.ts | 6 +++--- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41c2c840..def86241 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,16 +44,27 @@ jobs: npm run start - working-directory: ./cypress-e2e run: npm ci - - - name: Cypress run - uses: cypress-io/github-action@v6 - with: + cypress-tests: + runs-on: ubuntu-latest + # Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization + # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs + # Also see warning here https://github.com/cypress-io/github-action#parallel + strategy: + fail-fast: false # https://github.com/cypress-io/github-action/issues/48 + matrix: + containers: [1, 2] # Uses 2 parallel instances + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Cypress run + uses: cypress-io/github-action@v6 + with: command: npx cypress run --record --parallel --key ${{ secrets.CYPRESS_RECORD_KEY }} --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}} build: npm run build start: npm start wait-on: "http://localhost:3000" wait-on-timeout: 120 - working-directory: ./cypress-e2e + working-directory: ./src/client env: VITE_APP_VERSION: 0.0.99+dev TZ: Europe/Zurich diff --git a/cypress-e2e/cypress.config.ts b/cypress-e2e/cypress.config.ts index 3303a6d0..df394872 100644 --- a/cypress-e2e/cypress.config.ts +++ b/cypress-e2e/cypress.config.ts @@ -41,8 +41,8 @@ export default defineConfig({ * So e.g. copy the username and password env vars and add the credentials you want to use for the local tests. * (Don't worry, the cypress.env.json fill will not be committed as it is added to the .gitignore file) */ - assetsBaseUrl: '#{assetsBaseUrl}#', //keep this naming pattern as username and password will be replaced in the pipeline - basic_auth_username: '#{BASIC_AUTH.Username}#', //keep this naming pattern as username and password will be replaced in the pipeline - basic_auth_password: '#{BASIC_AUTH.Password}#' //keep this naming pattern as username and password will be replaced in the pipeline + assetsBaseUrl: 'http://localhost:4200/de', //keep this naming pattern as username and password will be replaced in the pipeline + basic_auth_username: 'admin', //keep this naming pattern as username and password will be replaced in the pipeline + basic_auth_password: 'admin' //keep this naming pattern as username and password will be replaced in the pipeline } });