split codeql workflow into two files as no compilation is needed for python

This commit is contained in:
Axel Kohlmeyer 2020-10-01 12:52:23 -04:00
parent 60a11b9ea1
commit 0be1a419c7
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
2 changed files with 43 additions and 1 deletions

View File

@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp', 'python']
language: ['cpp']
steps:
- name: Checkout repository

42
.github/workflows/codeql-python.yml vendored Normal file
View File

@ -0,0 +1,42 @@
# GitHub action to run static code analysis on C++ and Python code
name: "CodeQL Code Analysis"
on:
push:
branches: [master]
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['python']
steps:
- name: Checkout repository
if: ${{ github.repository == 'lammps/lammps' }}
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.repository == 'lammps/lammps' && github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
if: ${{ github.repository == 'lammps/lammps' }}
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
if: ${{ github.repository == 'lammps/lammps' }}
uses: github/codeql-action/analyze@v1