Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/02-workflow-filtro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 02 - Workflow Filtro

on:
push:
branches: 'feature/**'

jobs:
echo:
runs-on: ubuntu-latest
steps:
- name: Exibir o evento
run: echo "Workflow disparado por ${{ github.event_name }}"

29 changes: 29 additions & 0 deletions .github/workflows/03-minhas-actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 03 - Actions

on:
push:
branches: "feature/**"

jobs:
checkout_java_docker:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Setup Java SDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Build
uses: docker/build-push-action@v6
with:
push: false

- name: Executar scripts
run: |
git branch
java --version
mvn clean package
20 changes: 20 additions & 0 deletions .github/workflows/continuous_integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Continuous Integration
on:
pull_request:
types: [opened, reopened]
branches: "feature/**"
jobs:
tests:
runs-on: ubuntu-latest
steps:
-
name: Git Checkout
uses: actions/checkout@v4

- name: Setup Java SDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Unit tests
run: mvn test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Aplicação API
docker compose up --build
```

## Testes unitários (validação)
## Testes unitários (nova validação)

./mvnw test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void testGivenNewProduto_whenCreate_thenSavedProduto() throws Exception{
@DisplayName("test fail")
@Test
void testGivenNewProduto_whenCreate_thenFail() throws Exception{
// fail("Um erro acontecerá");
//fail("um erro acontecerá");
}

}