From de8a5ea8c88c4ecd3ddee4cf017cfddb927c0491 Mon Sep 17 00:00:00 2001 From: Elissdev Date: Tue, 31 Mar 2026 12:35:53 -0300 Subject: [PATCH 1/2] testando disparo do pull request --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index eb12da8..aa1ff6e 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,5 @@ Repositório criado para estruturação e aprendizado de testes de unidade em ba Para executar a validação inicial, rode o comando abaixo na raiz do projeto: `./vendor/bin/phpunit tests/ExemploTest.php` + +*Testando a integração contínua do GitHub Actions.* \ No newline at end of file From 8af5effdda7a4a9f989bffe8d9d9c57dc095de82 Mon Sep 17 00:00:00 2001 From: Elissdev Date: Tue, 31 Mar 2026 13:43:44 -0300 Subject: [PATCH 2/2] ci: configurando geracao de relatorio html e upload de artefato --- .github/workflows/phpunit.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 296c5ab..1296d85 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -17,10 +17,18 @@ jobs: - name: 2. Instalando o PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.1' - name: 3. Instalando o Composer e dependências run: composer install - - name: 4. A Hora da Verdade - Rodando o PHPUnit - run: ./vendor/bin/phpunit tests/ExemploTest.php \ No newline at end of file + - name: 4. A Hora da Verdade - Rodando o PHPUnit e gerando relatório + # O parâmetro --testdox-html diz pro PHPUnit cuspir o resultado em um arquivo visual + run: ./vendor/bin/phpunit tests/ExemploTest.php --testdox-html relatorio-phpunit.html + + - name: 5. Guardando o relatório como Artefato + uses: actions/upload-artifact@v4 + if: always() # Super importante: salva o arquivo mesmo se o teste der erro + with: + name: relatorio-de-testes # O nome da pastinha que vai aparecer no GitHub + path: relatorio-phpunit.html # O nome exato do arquivo que o PHPUnit cuspiu \ No newline at end of file