From 39e3620653d98bf8e3cde7bf0af97340c38ac00d Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 22:56:18 -0300 Subject: [PATCH 01/18] =?UTF-8?q?Adiciona=20integra=C3=A7=C3=A3o=20cont?= =?UTF-8?q?=C3=ADnua=20com=20Cypress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/cypress-ci.yml diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml new file mode 100644 index 0000000000..10c02fd15e --- /dev/null +++ b/.github/workflows/cypress-ci.yml @@ -0,0 +1,25 @@ +name: cypress-ci + +on: + push: + branch: + - '*' + pull_request: + branch: + - '*' + +jobs: + cypress-run: + runs-on: ubuntu-latest + steps: + - name: Git Checkout + uses: actions/checkout@v6 + + - name: Ir para src/ + uses: cd src/ + + - name: Instala as dependências + run: npm install + + - name: Executa os testes do Cypress + run: npx cypress run --spec "src/opportunityPage/*.js" \ No newline at end of file From 3ddd327250f4ba5efe463c11ec05bc524d84a767 Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 22:59:16 -0300 Subject: [PATCH 02/18] Corrige 'uses' para 'run' --- .github/workflows/cypress-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 10c02fd15e..daee85df01 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v6 - name: Ir para src/ - uses: cd src/ + run: cd src/ - name: Instala as dependências run: npm install From ad15840cf00b90f2cd281f63e76802dac27d97b1 Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:01:09 -0300 Subject: [PATCH 03/18] =?UTF-8?q?Puxa=20GitHub=20Actions=20na=20vers=C3=A3?= =?UTF-8?q?o=206x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index daee85df01..1abbb977f2 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -12,6 +12,7 @@ jobs: cypress-run: runs-on: ubuntu-latest steps: + - uses: cypress-io/github-action@v6 - name: Git Checkout uses: actions/checkout@v6 From 155bfe5a1901dfc6b2ea8fe1f53a67540ac466ad Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:03:48 -0300 Subject: [PATCH 04/18] =?UTF-8?q?Corrige=20vers=C3=A3o=20do=20actions/chec?= =?UTF-8?q?kout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 1abbb977f2..19a78d27fb 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -13,8 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: cypress-io/github-action@v6 + - name: Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v4 - name: Ir para src/ run: cd src/ From bab99d46f97a9826b63a83c6d1a088fe2058ae4f Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:05:19 -0300 Subject: [PATCH 05/18] Remove fetch pelo GH Actions --- .github/workflows/cypress-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 19a78d27fb..8019ba07c0 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -12,8 +12,6 @@ jobs: cypress-run: runs-on: ubuntu-latest steps: - - uses: cypress-io/github-action@v6 - - name: Git Checkout uses: actions/checkout@v4 From b790dbd0bc2b37249a6c279526d97121f7f682e0 Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:09:27 -0300 Subject: [PATCH 06/18] =?UTF-8?q?Adiciona=20c=C3=B3digo=20de=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 8019ba07c0..31f68ca2e2 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -18,6 +18,9 @@ jobs: - name: Ir para src/ run: cd src/ + - name: Ver o diretório onde está o workflow + run: ls -al + - name: Instala as dependências run: npm install From 6260b0bc16ac9e652472434f86087dde5c54a471 Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:11:11 -0300 Subject: [PATCH 07/18] Tentativa de executar dois runs simultaneamente no YAML --- .github/workflows/cypress-ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 31f68ca2e2..d0bbed0e62 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -15,13 +15,8 @@ jobs: - name: Git Checkout uses: actions/checkout@v4 - - name: Ir para src/ - run: cd src/ - - - name: Ver o diretório onde está o workflow - run: ls -al - - name: Instala as dependências + run: cd src/ run: npm install - name: Executa os testes do Cypress From 9704a94aacd3a6a51bc09ec6ef7f8cef194533ab Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:13:02 -0300 Subject: [PATCH 08/18] Executa cd src/ e npm install na mesma linha --- .github/workflows/cypress-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index d0bbed0e62..591b539412 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -16,8 +16,7 @@ jobs: uses: actions/checkout@v4 - name: Instala as dependências - run: cd src/ - run: npm install + run: cd src/ && npm install - name: Executa os testes do Cypress run: npx cypress run --spec "src/opportunityPage/*.js" \ No newline at end of file From 3f4321e2b019b62f5dcc920593fbb55d6086763e Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:17:12 -0300 Subject: [PATCH 09/18] Corrige caminho relativo aos testes na pag. de oportunidade --- .github/workflows/cypress-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 591b539412..15a8e5449f 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -19,4 +19,4 @@ jobs: run: cd src/ && npm install - name: Executa os testes do Cypress - run: npx cypress run --spec "src/opportunityPage/*.js" \ No newline at end of file + run: npx cypress run --spec "src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file From 7d1241d04f465f6c53fedcc388b5f9aa195c5b7c Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:21:51 -0300 Subject: [PATCH 10/18] =?UTF-8?q?Adiciona=20c=C3=B3digo=20que=20executa=20?= =?UTF-8?q?o=20Cypress=20pela=20primeira=20vez=20para=20adicionar=20config?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 15a8e5449f..51d919751b 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -18,5 +18,8 @@ jobs: - name: Instala as dependências run: cd src/ && npm install + - name: Abre o Cypress pela primeira vez para adicionar configs + run: cd src/ && npx cypress open + - name: Executa os testes do Cypress run: npx cypress run --spec "src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file From af9e0bbfd0630c83e4ee952587d4a6f57e8de8ad Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:29:01 -0300 Subject: [PATCH 11/18] =?UTF-8?q?Executa=203=20comandos=20na=20mesma=20lin?= =?UTF-8?q?ha=20pois=20o=20Cypress=20fica=20aberto=20indefinidamente=20com?= =?UTF-8?q?=20um=20comando=20s=C3=B3=20para=20isso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 51d919751b..ae38b91a47 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -15,11 +15,8 @@ jobs: - name: Git Checkout uses: actions/checkout@v4 - - name: Instala as dependências - run: cd src/ && npm install - - - name: Abre o Cypress pela primeira vez para adicionar configs - run: cd src/ && npx cypress open + - name: Instala as dependências, cria configs e executa testes + run: cd src/ && npm install && npx cypress open && npx cypress run - name: Executa os testes do Cypress run: npx cypress run --spec "src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file From 03a3d1ad05d887e8574a9c32ca1330f3d12ba657 Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:34:37 -0300 Subject: [PATCH 12/18] =?UTF-8?q?Faz=20a=20linha=20de=20execu=C3=A7=C3=A3o?= =?UTF-8?q?=20de=20testes=20fazer=20todo=20o=20processo=20de=20instala?= =?UTF-8?q?=C3=A7=C3=A3o=20de=20depend=C3=AAncias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index ae38b91a47..54bffa359e 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -16,7 +16,4 @@ jobs: uses: actions/checkout@v4 - name: Instala as dependências, cria configs e executa testes - run: cd src/ && npm install && npx cypress open && npx cypress run - - - name: Executa os testes do Cypress - run: npx cypress run --spec "src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file + run: cd src/ && npm install && cd .. && npx cypress run --spec "src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file From 078e3dd26fa52d66f46edbfeac667b5ee1fb31bb Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:45:46 -0300 Subject: [PATCH 13/18] debug --- .github/workflows/cypress-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 54bffa359e..b4b1636215 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -16,4 +16,4 @@ jobs: uses: actions/checkout@v4 - name: Instala as dependências, cria configs e executa testes - run: cd src/ && npm install && cd .. && npx cypress run --spec "src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file + run: cd src/ && npm install && cd .. && ls -al && npx cypress run --spec "/src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file From 88bf36a6d198a40591b02c0063e4566a98c1079d Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:47:36 -0300 Subject: [PATCH 14/18] =?UTF-8?q?Remove=20cd=20..=20que=20causava=20erro?= =?UTF-8?q?=20por=20n=C3=A3o=20estar=20no=20diret=C3=B3rio=20correto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index b4b1636215..3bf99df02b 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -16,4 +16,4 @@ jobs: uses: actions/checkout@v4 - name: Instala as dependências, cria configs e executa testes - run: cd src/ && npm install && cd .. && ls -al && npx cypress run --spec "/src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file + run: cd src/ && npm install && ls -al && npx cypress run --spec "/src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file From 55928c5e139127066021649f797091f56dfb8e19 Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:51:12 -0300 Subject: [PATCH 15/18] Tentativa de consertar o caminho relativo ao teste --- .github/workflows/cypress-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index 3bf99df02b..fe829d4c24 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -16,4 +16,4 @@ jobs: uses: actions/checkout@v4 - name: Instala as dependências, cria configs e executa testes - run: cd src/ && npm install && ls -al && npx cypress run --spec "/src/cypress/e2e/opportunityPage/*.js" \ No newline at end of file + run: cd src/ && npm install && ls -al && npx cypress run --spec "/src/cypress/e2e/opportunityPage/index.cy.js" \ No newline at end of file From ceb4acc420c33bc437270695e276f817e3990aa3 Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:52:44 -0300 Subject: [PATCH 16/18] Tentativa de consertar o caminho relativo ao teste --- .github/workflows/cypress-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index fe829d4c24..eab187d51d 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -16,4 +16,4 @@ jobs: uses: actions/checkout@v4 - name: Instala as dependências, cria configs e executa testes - run: cd src/ && npm install && ls -al && npx cypress run --spec "/src/cypress/e2e/opportunityPage/index.cy.js" \ No newline at end of file + run: cd src/ && npm install && ls -al && npx cypress run --spec "src/cypress/e2e/opportunityPage/index.cy.js" \ No newline at end of file From 4974aa9d3e1d225f0de8f1ae1fae5c37dfab4356 Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:54:52 -0300 Subject: [PATCH 17/18] Tentativa de consertar o caminho relativo ao teste --- .github/workflows/cypress-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index eab187d51d..c4a0287e28 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -16,4 +16,4 @@ jobs: uses: actions/checkout@v4 - name: Instala as dependências, cria configs e executa testes - run: cd src/ && npm install && ls -al && npx cypress run --spec "src/cypress/e2e/opportunityPage/index.cy.js" \ No newline at end of file + run: cd src/ && npm install && ls -al && npx cypress run --spec "cypress/e2e/opportunityPage/index.cy.js" \ No newline at end of file From da0d3db3ef92ff4b078a577f763a8eda3cdb45ad Mon Sep 17 00:00:00 2001 From: Caio Date: Wed, 29 May 2024 23:57:04 -0300 Subject: [PATCH 18/18] Tentativa de consertar o caminho relativo ao teste --- .github/workflows/cypress-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-ci.yml b/.github/workflows/cypress-ci.yml index c4a0287e28..ad9123feab 100644 --- a/.github/workflows/cypress-ci.yml +++ b/.github/workflows/cypress-ci.yml @@ -16,4 +16,4 @@ jobs: uses: actions/checkout@v4 - name: Instala as dependências, cria configs e executa testes - run: cd src/ && npm install && ls -al && npx cypress run --spec "cypress/e2e/opportunityPage/index.cy.js" \ No newline at end of file + run: cd src/ && npm install && ls -al && npx cypress run --spec "cypress/e2e/**/*.js" \ No newline at end of file