From 0bf7ba7bf9fd14818546895f7b98f93f826f6cdf Mon Sep 17 00:00:00 2001 From: Gustavo Castro Date: Sun, 3 Nov 2024 20:55:13 -0300 Subject: [PATCH 1/2] Configurando GitHub Actions --- .github/workflows/actions.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/actions.yaml diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml new file mode 100644 index 0000000..0311331 --- /dev/null +++ b/.github/workflows/actions.yaml @@ -0,0 +1,29 @@ +name: Github CI +on: + # Configura servidor de CI para executar o pipeline de tarefas abaixo (jobs) quando + # um push ou pull request for realizado tendo como alvo a branch main + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + pipeline: + runs-on: ubuntu-latest # Os comandos serão executados em um sistema operacional Linux + + steps: + - name: Git Checkout + uses: actions/checkout@v2 # Faz o checkout do código recebido + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 # Configura o Java 1.8 + with: + java-version: 1.8 + + - name: Build + run: mvn package -Dmaven.test.skip=true # Compila o código fonte + + - name: Unit Test + run: mvn test # Executada os testes de unidade From 629ba4e372644edcf7b5593eec2715ffa2c273ea Mon Sep 17 00:00:00 2001 From: Gustavo Castro Date: Sun, 3 Nov 2024 20:57:20 -0300 Subject: [PATCH 2/2] =?UTF-8?q?Incluindo=20altera=C3=A7=C3=B5es=20na=20fun?= =?UTF-8?q?=C3=A7=C3=A3o=20soma?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/br/ufmg/dcc/Calculadora.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/br/ufmg/dcc/Calculadora.java b/src/main/java/br/ufmg/dcc/Calculadora.java index faa1da1..c1b31c0 100644 --- a/src/main/java/br/ufmg/dcc/Calculadora.java +++ b/src/main/java/br/ufmg/dcc/Calculadora.java @@ -3,11 +3,11 @@ public class Calculadora { public int soma(int x, int y) { - return x + y; + return x + y + 1; } public int subtrai(int x, int y) { return x - y; } -} \ No newline at end of file +}