Skip to content

Group dependabot more #469

Group dependabot more

Group dependabot more #469

Workflow file for this run

# License: LGPL-3.0-or-later
name: Code scanning
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# this version used for running various tools
tool_node_version: "16.x"
tool_ruby_version: "2.7.8"
jobs:
eslint:
runs-on: ubuntu-latest
name: Run eslint scanning
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-packages
with:
node: ${{ env.tool_node_version }}
- name: Install eslint formatter
run: |
yarn add @microsoft/eslint-formatter-sarif@2.1.7
- name: Run ESLint
run: yarn eslint
--format @microsoft/eslint-formatter-sarif
--output-file eslint-results.sarif
continue-on-error: true
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: eslint-results.sarif
wait-for-processing: true
rubocop:
name: Run rubocop
runs-on: ubuntu-20.04
permissions:
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/install-packages
with:
ruby: ${{ env.tool_ruby_version }}
- name: Allow adding the code-scanning-rubocop gem
run: bundle config unset deployment
- name: Install Code Scanning integration
run: bundle add code-scanning-rubocop --skip-install
- name: Install dependencies
run: bundle install
- name: Rubocop run
run: |
bash -c "
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
[[ $? -ne 2 ]]
"
- name: Upload Sarif output
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rubocop.sarif