|
13 | 13 | - next
|
14 | 14 |
|
15 | 15 | jobs:
|
| 16 | + prepare-supported-codeql-env-matrix: |
| 17 | + name: Prepare supported CodeQL environment matrix |
| 18 | + runs-on: ubuntu-latest |
| 19 | + outputs: |
| 20 | + matrix: ${{ steps.export-supported-codeql-env-matrix.outputs.matrix }} |
| 21 | + steps: |
| 22 | + - name: Checkout repository |
| 23 | + uses: actions/checkout@v2 |
| 24 | + |
| 25 | + - name: Export supported CodeQL environment matrix |
| 26 | + id: export-supported-codeql-env-matrix |
| 27 | + run: | |
| 28 | + echo "::set-output name=matrix::$( |
| 29 | + jq --compact-output '.supported_environment | {include: .}' supported_codeql_configs.json |
| 30 | + )" |
| 31 | +
|
| 32 | + analysis-report-tests: |
| 33 | + name: Run analysis report tests |
| 34 | + needs: prepare-supported-codeql-env-matrix |
| 35 | + runs-on: ubuntu-latest |
| 36 | + strategy: |
| 37 | + fail-fast: false |
| 38 | + matrix: ${{ fromJSON(needs.prepare-supported-codeql-env-matrix.outputs.matrix) }} |
| 39 | + steps: |
| 40 | + - name: Checkout |
| 41 | + uses: actions/checkout@v2 |
| 42 | + |
| 43 | + - name: Install Python |
| 44 | + uses: actions/setup-python@v4 |
| 45 | + with: |
| 46 | + python-version: "3.9" |
| 47 | + |
| 48 | + - name: Install Python dependencies |
| 49 | + run: pip install -r scripts/reports/requirements.txt |
| 50 | + |
| 51 | + - name: Cache CodeQL |
| 52 | + id: cache-codeql |
| 53 | + uses: actions/cache@v2.1.3 |
| 54 | + with: |
| 55 | + path: ${{ github.workspace }}/codeql_home |
| 56 | + key: codeql-home-${{ matrix.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library }} |
| 57 | + |
| 58 | + - name: Install CodeQL |
| 59 | + if: steps.cache-codeql.outputs.cache-hit != 'true' |
| 60 | + uses: ./.github/actions/install-codeql |
| 61 | + with: |
| 62 | + codeql-cli-version: ${{ matrix.codeql_cli }} |
| 63 | + codeql-stdlib-version: ${{ matrix.codeql_standard_library }} |
| 64 | + codeql-home: ${{ github.workspace }}/codeql_home |
| 65 | + add-to-path: false |
| 66 | + |
| 67 | + - name: Run PyTest |
| 68 | + env: |
| 69 | + CODEQL_HOME: ${{ github.workspace }}/codeql_home |
| 70 | + run: | |
| 71 | + PATH=$PATH:$CODEQL_HOME/codeql |
| 72 | + pytest scripts/reports/analysis_report_test.py |
| 73 | +
|
16 | 74 | recategorization-tests:
|
17 | 75 | name: Run Guideline Recategorization tests
|
18 | 76 | runs-on: ubuntu-latest
|
|
0 commit comments