diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 7a22b4e8..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,87 +0,0 @@ -version: 2.1 -orbs: - codecov: codecov/codecov@1.0.5 -executor: machine -jobs: - assemble: - machine: - image: 'ubuntu-2004:2023.02.1' - working_directory: ~/repo - environment: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false - TERM: dumb - steps: - - checkout - - run: - name: style - command: ./gradlew ktlintCheck - - run: - name: assemble - command: ./gradlew assemble - - pluginTest: - machine: - image: 'ubuntu-2004:2023.02.1' - working_directory: ~/repo - environment: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=false -Dorg.gradle.daemon=false - TERM: dumb - steps: - - checkout - - run: - name: style - command: ./gradlew collectUnitTest --info - publisherTest: - machine: - image: 'ubuntu-2004:2023.02.1' - working_directory: ~/repo - environment: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false - TERM: dumb - steps: - - checkout - - run: - name: style - command: ./gradlew collectUnitTestLibs - sample: - machine: - image: 'ubuntu-2004:2023.02.1' - working_directory: ~/repo - environment: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false - TERM: dumb - steps: - - checkout - - run: - name: build sample - command: | - cd sample - ./gradlew assemble - deploy-snapshot: - machine: - image: 'ubuntu-2004:2023.02.1' - steps: - - checkout - - run: - name: snapshot - command: ./gradlew publishAllPublicationsToSnapshotsRepository -workflows: - version: 2.1 - build-snap: - jobs: - - assemble - - pluginTest - - publisherTest - - deploy-snapshot: - requires: - - assemble - - pluginTest - - publisherTest - filters: - branches: - only: master - - sample: - requires: - - assemble - - pluginTest - - publisherTest diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..fb873b9f --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,111 @@ +name: Run Gradle on PRs +on: + pull_request: + push: + branches: + - master +jobs: + ktlint: + timeout-minutes: 300 + strategy: + matrix: + os: [ubuntu-latest] + version: [11] + vendor: [zulu] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: ${{ matrix.vendor }} + java-version: ${{ matrix.version }} + + - name: Execute Gradle ktlint + run: ./gradlew ktlintCheck + build: + timeout-minutes: 300 + strategy: + matrix: + os: [ubuntu-latest] + version: [11] + vendor: [zulu] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: ${{ matrix.vendor }} + java-version: ${{ matrix.version }} + + - name: Execute Gradle build + run: ./gradlew assemble + + pluginTest: + timeout-minutes: 300 + strategy: + matrix: + os: [ubuntu-latest] + version: [11] + vendor: [zulu] + runs-on: ${{ matrix.os }} + services: + docker: + image: docker:20.10.7 + options: --privileged + ports: + - 5432:5432 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: ${{ matrix.vendor }} + java-version: ${{ matrix.version }} + + - name: Execute Gradle build + run: ./gradlew collectUnitTest + + publisherTest: + timeout-minutes: 300 + strategy: + matrix: + os: [ubuntu-latest] + version: [11] + vendor: [zulu] + runs-on: ${{ matrix.os }} + services: + docker: + image: docker:20.10.7 + options: --privileged + ports: + - 5432:5432 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: ${{ matrix.vendor }} + java-version: ${{ matrix.version }} + + - name: Execute Gradle build + run: ./gradlew collectUnitTestLibs + + sample: + timeout-minutes: 300 + strategy: + matrix: + os: [ubuntu-latest,macos-latest,windows-latest] + version: [11] + vendor: [zulu] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: ${{ matrix.vendor }} + java-version: ${{ matrix.version }} + + - name: Execute Gradle build + run: | + cd sample + ./gradlew assemble + ./gradlew assemble --configuration-cache + ./gradlew assemble --configuration-cache diff --git a/.github/workflows/snapshot.yaml b/.github/workflows/snapshot.yaml new file mode 100644 index 00000000..41c82643 --- /dev/null +++ b/.github/workflows/snapshot.yaml @@ -0,0 +1,36 @@ +name: Publish Snapshots + +on: + push: + branches: + - master + +jobs: + publishing_snapshots: + timeout-minutes: 300 + strategy: + matrix: + os: [ubuntu-latest] + version: [11] + vendor: [zulu] + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.version }} + distribution: ${{ matrix.vendor }} + + - name: Publish snapshots + run: ./gradlew publishAllPublicationsToSnapshotsRepository + env: + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} + SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} + USERNAME_SNAPSHOT: ${{ secrets.USERNAME_SNAPSHOT }} + PASSWORD_SNAPSHOT: ${{ secrets.PASSWORD_SNAPSHOT }} + +