diff --git a/.github/workflows/build.yml b/.github/workflows/cd.yml similarity index 94% rename from .github/workflows/build.yml rename to .github/workflows/cd.yml index 9afac952..ca2b6690 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/cd.yml @@ -1,13 +1,11 @@ -name: Build +name: Build and Deploy on: push: branches: [ "master" ] - pull_request_target: - branches: [ "master" ] permissions: - contents: read + contents: write checks: write jobs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..53b17db3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: Test + +on: + pull_request: + types: + - opened + - edited + - synchronize + - reopened + +permissions: + contents: write + checks: write + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Build + uses: gradle/gradle-build-action@v2 + with: + gradle-version: 8.5 + arguments: build + + - name: Test + uses: gradle/gradle-build-action@v2 + with: + gradle-version: 8.5 + arguments: test