Skip to content

[DMS-515] CodeQL for Kafka Connectors (#13) #61

[DMS-515] CodeQL for Kafka Connectors (#13)

[DMS-515] CodeQL for Kafka Connectors (#13) #61

# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
name: On Pull Request
on:
push:
branches:
- main
paths:
- "kafka/**"
- ".github/**/*.yml"
pull_request:
branches:
- main
paths:
- "kafka/**"
- ".github/**/*.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
scan-actions-bidi:
name: Scan Actions, scan all files for BIDI Trojan Attacks
uses: Ed-Fi-Alliance-OSS/Ed-Fi-Actions/.github/workflows/repository-scanner.yml@main
with:
config-file-path: ./.github/workflows/bidi-config.json
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: kafka/ed-fi-kafka-connect-transforms
steps:
- name: Checkout the Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Dependency Review ("Dependabot on PR")
if: ${{ github.event_name == 'pull_request' && !github.event.repository.fork }}
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
- name: Setup Java
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
- name: Generate Gradle wrapper
run: gradle wrapper
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew clean build
- name: Run tests with Gradle
run: ./gradlew test
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5
with:
name: Unit Test Results
overwrite: true
path: |
./kafka/ed-fi-kafka-connect-transforms/build/reports/tests/test/classes/*.html
- name: Upload build artifacts
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5
with:
name: Package
path: ./kafka/ed-fi-kafka-connect-transforms/build/libs
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
name: Run Linter on Dockerfile
with:
dockerfile: ./kafka/Dockerfile
failure-threshold: error