From 270f17c7542a55ee49ebebb2333c6bb5b8f06e92 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Mon, 20 Mar 2023 20:44:33 +0100 Subject: [PATCH 01/14] Add an action Signed-off-by: Quentin Legot --- .gitea/workflows/test.yml | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..23ced80 --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,44 @@ +# Automatically build the project and run any configured tests for every push +# and submitted pull request. This can help catch issues that only occur on +# certain platforms or Java versions, and provides a first line of defence +# against bad commits. + +name: build +on: [pull_request, push] + +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [ + 17, # Current Java LTS & minimum supported by Minecraft + ] + # and run on both Linux and Windows + os: [ubuntu-22.04, windows-2022] + runs-on: ${{ matrix.os }} + steps: + - name: checkout repository + uses: actions/checkout@v3 + - name: validate gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: setup jdk ${{ matrix.java }} + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.java }} + - name: make gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: build + run: ./gradlew build + - name: test + run: ./gradlew test + deploy: + runs-on: ${{ ubuntu-22.04 }} + if: gitea.ref == 'refs/heads/master' + steps: + - name: deploy + uses: actions/upload-artifact@v3 + with: + name: Artifacts + path: build/libs/ \ No newline at end of file From b9761edda0678e74704d9b2d4988353f90cba17a Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Mon, 20 Mar 2023 20:51:05 +0100 Subject: [PATCH 02/14] Update '.gitea/workflows/test.yml' --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 23ced80..fc6a05f 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -15,7 +15,7 @@ jobs: 17, # Current Java LTS & minimum supported by Minecraft ] # and run on both Linux and Windows - os: [ubuntu-22.04, windows-2022] + os: [ubuntu-latest, windows-2022] runs-on: ${{ matrix.os }} steps: - name: checkout repository From 899954f5a55997e61aca7ec5198dab4663e1bb42 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Mon, 20 Mar 2023 21:11:48 +0100 Subject: [PATCH 03/14] Update test.yml Signed-off-by: Quentin Legot --- .gitea/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index fc6a05f..6c2d2d3 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -20,8 +20,8 @@ jobs: steps: - name: checkout repository uses: actions/checkout@v3 - - name: validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 + # - name: validate gradle wrapper + # uses: gradle/wrapper-validation-action@v1 - name: setup jdk ${{ matrix.java }} uses: actions/setup-java@v3 with: From ed52206238d6857b53ddde9f44f355fbdd4c803c Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:30:25 +0100 Subject: [PATCH 04/14] Update action --- .gitea/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 6c2d2d3..a0d70c4 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -20,10 +20,10 @@ jobs: steps: - name: checkout repository uses: actions/checkout@v3 - # - name: validate gradle wrapper - # uses: gradle/wrapper-validation-action@v1 + - name: validate gradle wrapper + uses: https://github.com/gradle/wrapper-validation-action@v1 - name: setup jdk ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: https://github.com/actions/setup-java@v3 with: java-version: ${{ matrix.java }} - name: make gradle wrapper executable From 50070aeddf32595765cab3b99595ceb8ae461aca Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:35:30 +0100 Subject: [PATCH 05/14] update action --- .gitea/workflows/test.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index a0d70c4..25659ff 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -10,10 +10,6 @@ jobs: build: strategy: matrix: - # Use these Java versions - java: [ - 17, # Current Java LTS & minimum supported by Minecraft - ] # and run on both Linux and Windows os: [ubuntu-latest, windows-2022] runs-on: ${{ matrix.os }} @@ -22,10 +18,10 @@ jobs: uses: actions/checkout@v3 - name: validate gradle wrapper uses: https://github.com/gradle/wrapper-validation-action@v1 - - name: setup jdk ${{ matrix.java }} + - name: setup jdk 17 uses: https://github.com/actions/setup-java@v3 with: - java-version: ${{ matrix.java }} + java-version: 17 - name: make gradle wrapper executable if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew From 85d616506da6a6d83aa32209d4affac3c23ba739 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:38:41 +0100 Subject: [PATCH 06/14] update action --- .gitea/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 25659ff..7910a7f 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -19,16 +19,17 @@ jobs: - name: validate gradle wrapper uses: https://github.com/gradle/wrapper-validation-action@v1 - name: setup jdk 17 - uses: https://github.com/actions/setup-java@v3 + uses: setup-java@v3 with: java-version: 17 + distribution: 'oracle' - name: make gradle wrapper executable if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew - name: build - run: ./gradlew build + run: ./gradlew build --no-daemon - name: test - run: ./gradlew test + run: ./gradlew test --no-daemon deploy: runs-on: ${{ ubuntu-22.04 }} if: gitea.ref == 'refs/heads/master' From 2570163571e50914d190c0af712d221b5fdf94b5 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:41:15 +0100 Subject: [PATCH 07/14] update test --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 7910a7f..fe3584d 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: # and run on both Linux and Windows - os: [ubuntu-latest, windows-2022] + os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: checkout repository From 9237dc565ef2f51f383082cc932b5fdfde0e7cf5 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:46:21 +0100 Subject: [PATCH 08/14] test updated --- .gitea/workflows/test.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index fe3584d..ea224ba 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -4,24 +4,25 @@ # against bad commits. name: build -on: [pull_request, push] +on: [push, pull_request] jobs: build: strategy: matrix: + java: [ '17' ] # and run on both Linux and Windows - os: [ubuntu-latest] + os: [ubuntu-latest, windows-2022] runs-on: ${{ matrix.os }} steps: - name: checkout repository uses: actions/checkout@v3 - name: validate gradle wrapper uses: https://github.com/gradle/wrapper-validation-action@v1 - - name: setup jdk 17 + - name: setup jdk ${{ matrix.Java }} uses: setup-java@v3 with: - java-version: 17 + java-version: ${{ matrix.java }} distribution: 'oracle' - name: make gradle wrapper executable if: ${{ runner.os != 'Windows' }} From bd89b4cd721bf1ea845ee1ffce74e189315e225b Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:48:56 +0100 Subject: [PATCH 09/14] Update '.gitea/workflows/test.yml' --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index ea224ba..de15d13 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -32,7 +32,7 @@ jobs: - name: test run: ./gradlew test --no-daemon deploy: - runs-on: ${{ ubuntu-22.04 }} + runs-on: ${{ ubuntu-latest }} if: gitea.ref == 'refs/heads/master' steps: - name: deploy From 265cb9b891ed179f389c52f212911e8e3c830482 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:57:52 +0100 Subject: [PATCH 10/14] update test.yml, please action work... --- .gitea/workflows/test.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index de15d13..964180e 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -4,12 +4,17 @@ # against bad commits. name: build -on: [push, pull_request] +on: + push: + branches: [ master, dev ] + pull_request_target: + branches: [ master, dev ] + jobs: build: strategy: - matrix: + matrix:- java: [ '17' ] # and run on both Linux and Windows os: [ubuntu-latest, windows-2022] From 2ad62de9f71eddb217fdb4fb3fb6eebad937fdf9 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 09:00:01 +0100 Subject: [PATCH 11/14] Fix test --- .gitea/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 964180e..0c7d9f2 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -3,7 +3,7 @@ # certain platforms or Java versions, and provides a first line of defence # against bad commits. -name: build +name: on: push: branches: [ master, dev ] @@ -14,7 +14,7 @@ on: jobs: build: strategy: - matrix:- + matrix: java: [ '17' ] # and run on both Linux and Windows os: [ubuntu-latest, windows-2022] @@ -44,4 +44,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: Artifacts - path: build/libs/ \ No newline at end of file + path: build/libs/ From f61b18ce132dc67d2defdab2c3408e709ca44930 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 09:03:34 +0100 Subject: [PATCH 12/14] fix test.yml --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 0c7d9f2..e5bfca5 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -15,7 +15,7 @@ jobs: build: strategy: matrix: - java: [ '17' ] + java: [ '17' ] # and run on both Linux and Windows os: [ubuntu-latest, windows-2022] runs-on: ${{ matrix.os }} From d77c45630d021c2ed31fa6542f452d97e3b14c78 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 09:04:54 +0100 Subject: [PATCH 13/14] fix test.yml --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index e5bfca5..a8e2a6d 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -22,7 +22,7 @@ jobs: steps: - name: checkout repository uses: actions/checkout@v3 - - name: validate gradle wrapper + - name: validate gradle wrapper uses: https://github.com/gradle/wrapper-validation-action@v1 - name: setup jdk ${{ matrix.Java }} uses: setup-java@v3 From 116e421dfc19b732fc089c38bf927463a123e43f Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 09:06:14 +0100 Subject: [PATCH 14/14] fix test.yml --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index a8e2a6d..91ff768 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -25,7 +25,7 @@ jobs: - name: validate gradle wrapper uses: https://github.com/gradle/wrapper-validation-action@v1 - name: setup jdk ${{ matrix.Java }} - uses: setup-java@v3 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} distribution: 'oracle'