Skip to content

Merge pull request #2386 from schemacrawler/dependabot/github_actions… #2346

Merge pull request #2386 from schemacrawler/dependabot/github_actions…

Merge pull request #2386 from schemacrawler/dependabot/github_actions… #2346

name: "CodeQL Analysis"
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- '**/*.java'
schedule:
- cron: '15 0 15 * *'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
# SETUP BUILD ENVIRONMENT
- id: prepare-maven-build
name: Prepare Maven build
uses: sualeh/prepare-maven-build@v1.7.2
with:
java-version: 17
- id: install-graphviz
name: Install Graphviz
uses: sualeh/install-graphviz@v1.0.3
# INIT CODEQL
- id: init-codeql
name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: java-kotlin
build-mode: manual
# BUILD DEPENDENCIES
- id: build-schemacrawler-core
name: Build SchemaCrawler-Core
uses: sualeh/build-maven-dependency@v1.0.8
with:
repository: schemacrawler/SchemaCrawler-Core
artifact: us.fatehi:schemacrawler:17.11.3
# BUILD AND TEST
- id: build-test
name: Build all modules and run tests
shell: bash
run: |
# Build
mvn \
--no-transfer-progress \
--batch-mode \
-DskipTests \
clean package
# ANALYZE
- id: perform-codeql-analysis
name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:java"