diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d77f312 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: [push] +jobs: + build-test: + runs-on: ubuntu-24.04 + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: Cypress Tests 🧪 + uses: cypress-io/github-action@v5 + with: + start: 'npm run dev' + build: 'npm run build' + + - uses: actions/upload-artifact@v3 + if: always() + with: + name: Cypress Result + path: | + cypress/screenshots + cypress/videos + cypress/results + if-no-files-found: ignore + diff --git a/README.md b/README.md index 35f28dd..67f56e2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Este repositório contém um aplicativo React simples de comentário de post. ### Pré-requisitos -Certifique-se de ter o Node.js instalado em seu sistema antes de executar este aplicativo. +Certifique-se de ter o Node.js instalado em seu sistema antes de executar este aplicativo - Node.js: [Baixe aqui](https://nodejs.org) diff --git a/cypress/e2e/main.spec.cy.js b/cypress/e2e/main.spec.cy.js index 73bc3a5..1ed3225 100644 --- a/cypress/e2e/main.spec.cy.js +++ b/cypress/e2e/main.spec.cy.js @@ -1,6 +1,6 @@ describe('template spec', () => { it('passes', () => { - cy.visit('http://127.0.0.1:5173/') + cy.visit('http://localhost:5173/') cy.get('[data-qa="profile-box"]') cy.get('[data-qa="comment-input"]').first().type('Test 123') cy.get('[data-qa="publish-button"]').first().click()