Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5571453

Browse filesBrowse files
committed
Add analysis report unit tests to testing workflow
1 parent 9e1be4d commit 5571453
Copy full SHA for 5571453

File tree

Expand file treeCollapse file tree

1 file changed

+58
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+58
-0
lines changed

‎.github/workflows/tooling-unit-tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/tooling-unit-tests.yml
+58Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,64 @@ on:
1313
- next
1414

1515
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+
1674
recategorization-tests:
1775
name: Run Guideline Recategorization tests
1876
runs-on: ubuntu-latest

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.