Daniel Bohry 1 an în urmă
părinte
comite
07be304dda
2 a modificat fișierele cu 18 adăugiri și 15 ștergeri
  1. 1 1
      .github/workflows/build.yml
  2. 17 14
      .github/workflows/buildAndRelease.yml

+ 1 - 1
.github/workflows/build.yml

@@ -16,4 +16,4 @@ jobs:
           java-version: '17' # or the version you use
           distribution: 'temurin' # or another distribution
       - name: Build with Maven
-        run: chmod +x ./mvnw && ./mvnw clean package
+        run: chmod +x ./mvnw && ./mvnw clean package test

+ 17 - 14
.github/workflows/buildAndRelease.yml

@@ -11,17 +11,20 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v3
-    - name: Build jar
-      run: chmod +x ./mvnw && ./mvnw clean jar:jar
-    - name: Run tests
-      run: ./mvnw test
-    - name: Build the Docker image
-      run: ./mvnw spring-boot:build-image
-    - name: Login to Docker Hub
-      uses: docker/login-action@v2
-      with:
-        username: ${{ secrets.DOCKERHUB_USERNAME }}
-        password: ${{ secrets.DOCKERHUB_TOKEN }}
-    - name: Push image
-      run: docker push lhamacorp/stocks-be
+      - uses: actions/checkout@v3
+      - name: Set up JDK
+        uses: actions/setup-java@v3
+        with:
+          java-version: '17' # or the version you use
+          distribution: 'temurin' # or another distribution
+      - name: Build with Maven
+        run: chmod +x ./mvnw && ./mvnw clean package test
+      - name: Build the Docker image
+        run: ./mvnw spring-boot:build-image
+      - name: Login to Docker Hub
+        uses: docker/login-action@v2
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+      - name: Push image
+        run: docker push lhamacorp/stocks-be