diff --git a/.github/workflows/new2.yml b/.github/workflows/new2.yml new file mode 100644 index 000000000..bfef10e29 --- /dev/null +++ b/.github/workflows/new2.yml @@ -0,0 +1,35 @@ +name: CI + +on: [push, workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Code Quality Check with SonarCloud + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.LAB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + - name: Build Docker image + run: docker build -t my-microservice . + + - name: Run Docker image + run: docker run -d -p 8080:8080 my-microservice + + - name: Run tests + run: | + curl -v http://localhost:8080/ diff --git a/.github/workflows/nueva_rama.yml b/.github/workflows/nueva_rama.yml new file mode 100644 index 000000000..15cbbaf54 --- /dev/null +++ b/.github/workflows/nueva_rama.yml @@ -0,0 +1,15 @@ +name: CI + +on: [push, workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Nueva rama con nombre + uses: actions/checkout@v2 + + - name: Crea una nueva rama y se ubica en ella + run: | + git checkout -b feature-ms-diegoLucero-mensaje