Skip to content
Merged
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
37 changes: 9 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,24 @@
name: CI - Maven Tests
name: CI - Test Build

on:
push:
branches:
- develop
branches: [develop]
pull_request:
branches:
- develop

permissions:
contents: read
branches: [develop]

jobs:
build-and-test:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: 'temurin'
java-version: '21'

- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Build & run tests
run: mvn -B -DskipTests=false clean test

- name: Upload test results (JUnit)
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: target/surefire-reports
- name: Build with Maven
run: mvn clean package -DskipTests=false
33 changes: 11 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
name: CD - Deploy to Azure App Service
name: Deploy to Azure Web App

on:
push:
branches:
- main

permissions:
contents: read
packages: write

jobs:
build:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 21
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: 'temurin'
java-version: '21'

- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Build with Maven
run: mvn -B -DskipTests=true clean package
run: mvn clean package -DskipTests=true

- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v2
- name: 'Deploy to Azure WebApp'
uses: azure/webapps-deploy@v3
with:
app-name: '<YOUR_AZURE_APP_NAME>' # reemplaza o deja en blanco si usas publish-profile
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: '${{ github.workspace }}/target/*.jar'
app-name: masterchef
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISH_PROFILE }}
package: target/*.jar
63 changes: 0 additions & 63 deletions .github/workflows/main_masterchef.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Probandooooo
*/

package com.masterchef.recetas.controller;

import com.masterchef.recetas.model.Receta;
Expand Down