From 270f17c7542a55ee49ebebb2333c6bb5b8f06e92 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Mon, 20 Mar 2023 20:44:33 +0100 Subject: [PATCH 01/11] 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 -- 2.39.5 From b9761edda0678e74704d9b2d4988353f90cba17a Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Mon, 20 Mar 2023 20:51:05 +0100 Subject: [PATCH 02/11] 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 -- 2.39.5 From 899954f5a55997e61aca7ec5198dab4663e1bb42 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Mon, 20 Mar 2023 21:11:48 +0100 Subject: [PATCH 03/11] 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: -- 2.39.5 From ed52206238d6857b53ddde9f44f355fbdd4c803c Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:30:25 +0100 Subject: [PATCH 04/11] 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 -- 2.39.5 From 50070aeddf32595765cab3b99595ceb8ae461aca Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:35:30 +0100 Subject: [PATCH 05/11] 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 -- 2.39.5 From 85d616506da6a6d83aa32209d4affac3c23ba739 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:38:41 +0100 Subject: [PATCH 06/11] 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' -- 2.39.5 From 2570163571e50914d190c0af712d221b5fdf94b5 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:41:15 +0100 Subject: [PATCH 07/11] 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 -- 2.39.5 From 9237dc565ef2f51f383082cc932b5fdfde0e7cf5 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:46:21 +0100 Subject: [PATCH 08/11] 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' }} -- 2.39.5 From bd89b4cd721bf1ea845ee1ffce74e189315e225b Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:48:56 +0100 Subject: [PATCH 09/11] 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 -- 2.39.5 From 265cb9b891ed179f389c52f212911e8e3c830482 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 08:57:52 +0100 Subject: [PATCH 10/11] 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] -- 2.39.5 From 2ad62de9f71eddb217fdb4fb3fb6eebad937fdf9 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 21 Mar 2023 09:00:01 +0100 Subject: [PATCH 11/11] 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/ -- 2.39.5