diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..2d547b6 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,52 @@ +name: CodeQL Scanning + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + paths: + - 'src/main/kotlin/**' + - 'src/test/kotlin/**' + - 'src/main/resources/**' + - 'src/test/resources/**' + - '.github/workflows/codeql.yml' + schedule: + - cron: '26 4 * * 6' + +permissions: + security-events: write + packages: read + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: 'ubuntu-latest' + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + - language: java-kotlin + build-mode: manual + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Change Wrapper Permissions + run: chmod +x ./gradlew + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + - name: Build Project + run: |- + ./gradlew --no-daemon --info -S clean testClasses \ + -Pkotlin.incremental=false \ + -Dorg.gradle.workers.max=1 \ + -Pkotlin.compiler.execution.strategy=in-process + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/conventional-commit.yml b/.github/workflows/conventional-commit.yml new file mode 100644 index 0000000..441a421 --- /dev/null +++ b/.github/workflows/conventional-commit.yml @@ -0,0 +1,17 @@ +name: Conventional Commit Check + +on: + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + conventional-commit-check: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Check commits + uses: webiny/action-conventional-commits@v1.3.0 \ No newline at end of file diff --git a/.github/workflows/pr-pipeline.yml b/.github/workflows/pr-pipeline.yml new file mode 100644 index 0000000..d4c11e3 --- /dev/null +++ b/.github/workflows/pr-pipeline.yml @@ -0,0 +1,40 @@ +name: Code change pipeline + +on: + pull_request: + paths: + - 'src/main/kotlin/**' + - 'src/test/kotlin/**' + - 'src/main/resources/**' + - 'src/test/resources/**' + - 'build.gradle.kts' + - 'gradle.properties' + - '.github/workflows/pr-pipeline.yml' + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Validate Gradle + uses: gradle/actions/wrapper-validation@v4 + + - name: Change Wrapper Permissions + run: chmod +x ./gradlew + + - name: Build Project + run: |- + ./gradlew assemble + + - name: Check Project + run: |- + ./gradlew check \ No newline at end of file