From 70e9586b8cd800555ed85b56237e429525a380b2 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Mon, 26 Feb 2024 14:21:54 +0100 Subject: [PATCH] Build and push the backend on pr and merge --- .gitea/workflows/backend.yaml | 31 +++++++++++++++++++ .../workflows/{tests.yaml => frontend.yaml} | 4 +-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/backend.yaml rename .gitea/workflows/{tests.yaml => frontend.yaml} (95%) diff --git a/.gitea/workflows/backend.yaml b/.gitea/workflows/backend.yaml new file mode 100644 index 0000000..ff4bdb8 --- /dev/null +++ b/.gitea/workflows/backend.yaml @@ -0,0 +1,31 @@ +name: Build and test backend + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + Build-backend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + - uses: gradle/gradle-build-action@v3 + - name: building + run: ./gradlew backend:build + Test-backend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + - uses: gradle/gradle-build-action@v3 + - name: building + run: ./gradlew backend:test diff --git a/.gitea/workflows/tests.yaml b/.gitea/workflows/frontend.yaml similarity index 95% rename from .gitea/workflows/tests.yaml rename to .gitea/workflows/frontend.yaml index 87d5145..cd14e19 100644 --- a/.gitea/workflows/tests.yaml +++ b/.gitea/workflows/frontend.yaml @@ -7,7 +7,7 @@ on: branches: [ master ] jobs: - Build: + Build-frontend: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -20,7 +20,7 @@ jobs: - run: npm run build --if-present name: build working-directory: ./frontend - Test: + Test-frontend: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4