Skip to content

Commit

Permalink
adding gha (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdsap authored Nov 7, 2024
1 parent 2b70da3 commit 0933e3f
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 87 deletions.
87 changes: 0 additions & 87 deletions .circleci/config.yml

This file was deleted.

111 changes: 111 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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
36 changes: 36 additions & 0 deletions .github/workflows/snapshot.yaml
Original file line number Diff line number Diff line change
@@ -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 }}


0 comments on commit 0933e3f

Please sign in to comment.