Skip to content

Build and Analyze

Build and Analyze #77

Workflow file for this run

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "Build and Analyze"
on:
push:
branches: [ master,"1.5","1.6" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master,"1.5","1.6" ]
schedule:
- cron: '16 9 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
pull-requests: write
strategy:
fail-fast: true
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Build lcov.info
uses: actions/setup-node@v4
with:
cache: 'npm'
- run: npm ci
- run: docker compose up -d elasticsearch-cass
- run: npm run run:nyc
- name: Analyze with SonarCloud
uses: SonarSource/[email protected]
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
with:
args:
-Dsonar.projectKey=cassproject_CASS
-Dsonar.organization=cassproject
-Dsonar.sources=src/main/
-Dsonar.tests=src/test/
projectBaseDir: .
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3