From 2899a08c766b6208693fcddf865acfbe5f268ebd Mon Sep 17 00:00:00 2001 From: William Date: Tue, 20 Sep 2022 17:51:19 +0100 Subject: [PATCH] Fix uploading artifacts on PRs --- .github/workflows/java_ci.yml | 6 ++---- .github/workflows/pr_tests.yml | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/pr_tests.yml diff --git a/.github/workflows/java_ci.yml b/.github/workflows/java_ci.yml index 41d57221..3345872f 100644 --- a/.github/workflows/java_ci.yml +++ b/.github/workflows/java_ci.yml @@ -1,11 +1,9 @@ -# Builds and tests the project with Gradle +# Builds, tests the project with Gradle and uploads to Modrinth name: Java CI on: push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] + branches: [ 'master' ] permissions: contents: read diff --git a/.github/workflows/pr_tests.yml b/.github/workflows/pr_tests.yml new file mode 100644 index 00000000..ff80a12b --- /dev/null +++ b/.github/workflows/pr_tests.yml @@ -0,0 +1,24 @@ +# Carry out tests on pull requests +name: PR Tests + +on: + pull_request: + branches: [ 'master' ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 16 + uses: actions/setup-java@v3 + with: + java-version: '16' + distribution: 'temurin' + - name: Test Pull Request + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + with: + arguments: build test \ No newline at end of file