chore: #102 Removed the commented-out dependencies from kg-common
m…
#264
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow containts jobs for analyzing code | |
name: Code Analysis | |
on: push | |
# All jobs are run in parallel | |
jobs: | |
sonarcloud: | |
name: SonarCloud Analyze | |
runs-on: ubuntu-latest | |
# for local run -- $ act -j build -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 | |
steps: | |
# Clone repository with all branches and tags into GitHub virtual machine | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# see https://github.com/actions/setup-java | |
# Download and Install specific JDK version | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
# for act caching download https://static.azul.com/zulu/bin/zulu11.43.21-ca-jdk11.0.9-linux_x64.tar.gz | |
# to root workdir an uncomment | |
# jdkFile: zulu11.43.21-ca-jdk11.0.9-linux_x64.tar.gz | |
# Load packages from cache if present | |
# see https://github.com/actions/cache | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
# Build project, run tests and send to SonarCloud for analysis | |
- name: Analyze with SonarCloud | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: | | |
mvn -B verify -Dmaven.javadoc.skip --no-transfer-progress sonar:sonar \ | |
-Dsonar.projectKey=kghackers_kgparser \ | |
-Dsonar.organization=kghackers \ | |
-Dsonar.host.url=https://sonarcloud.io \ | |
-Dsonar.login=$SONAR_TOKEN | |
# Send notification about job outcome into KG Parser CI/CD telegram group | |
- name: Notify Telegram | |
uses: yanzay/[email protected] | |
if: always() | |
with: | |
chat: ${{ secrets.TGBOT_CHAT }} | |
token: ${{ secrets.TGBOT_TOKEN }} | |
status: ${{ job.status }} | |
# CodeQL analyzes JS code in repository | |
codeql_js: | |
name: CodeQL Analyze JS | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
config-file: ./.github/codeql/js-config.yml | |
languages: javascript | |
queries: security-and-quality | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
# CodeQL analyzes Java code in repository | |
codeql_java: | |
name: CodeQL Analyze Java | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# exclude html directory from java analysis | |
- name: Remove HTML directory | |
run: rm -rf html | |
# Download and Install specific JDK version | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
# for act caching download https://static.azul.com/zulu/bin/zulu11.43.21-ca-jdk11.0.9-linux_x64.tar.gz | |
# to root workdir uncomment | |
# jdkFile: zulu11.43.21-ca-jdk11.0.9-linux_x64.tar.gz | |
# Load packages from cache if present | |
# see https://github.com/actions/cache | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: java | |
queries: security-and-quality | |
# Automatically builds project with maven | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v3 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 |