From 4c1bed09fcc63e924a3a3690c2b021f735afb9a9 Mon Sep 17 00:00:00 2001 From: Luca Burgard Date: Wed, 24 Apr 2024 16:45:19 +0200 Subject: [PATCH] Initial commit --- .gitea/workflows/build-workflow.yml | 38 +++++++++++++++++++++++++++++ .gitea/workflows/test-workflow.yml | 38 +++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .gitea/workflows/build-workflow.yml create mode 100644 .gitea/workflows/test-workflow.yml diff --git a/.gitea/workflows/build-workflow.yml b/.gitea/workflows/build-workflow.yml new file mode 100644 index 0000000..da3dc41 --- /dev/null +++ b/.gitea/workflows/build-workflow.yml @@ -0,0 +1,38 @@ +on: + workflow_call: + inputs: + name: + type: string + required: true + +permissions: read-all + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '17' + + - name: Install Maven + run: sudo apt update && sudo apt-get install maven -y + + - name: Prepare Maven credentials + uses: s4u/maven-settings-action@v2.6.0 + with: + servers: | + [{ + "id": "repo", + "username": "${{ secrets.MAVEN_NAME }}", + "password": "${{ secrets.MAVEN_SECRET }}" + }] + + - name: Build with Maven + run: mvn clean install \ No newline at end of file diff --git a/.gitea/workflows/test-workflow.yml b/.gitea/workflows/test-workflow.yml new file mode 100644 index 0000000..6f32510 --- /dev/null +++ b/.gitea/workflows/test-workflow.yml @@ -0,0 +1,38 @@ +on: + workflow_call: + inputs: + name: + type: string + required: true + +permissions: read-all + +jobs: + test: + name: Test + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: '17' + + - name: Install Maven + run: sudo apt update && sudo apt-get install maven -y + + - name: Prepare Maven credentials + uses: s4u/maven-settings-action@v2.6.0 + with: + servers: | + [{ + "id": "repo", + "username": "${{ secrets.MAVEN_NAME }}", + "password": "${{ secrets.MAVEN_SECRET }}" + }] + + - name: Run tests with Maven + run: mvn test