From b9b7d9f2a68ae226f32c86a2a7ad193e403e8c6a Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 7 Nov 2022 15:29:29 +0000 Subject: [PATCH] Add PR check for file baseline information --- .../__export-file-baseline-information.yml | 67 +++++++++++++++++++ .../export-file-baseline-information.yml | 25 +++++++ 2 files changed, 92 insertions(+) create mode 100644 .github/workflows/__export-file-baseline-information.yml create mode 100644 pr-checks/checks/export-file-baseline-information.yml diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml new file mode 100644 index 000000000..240481b9a --- /dev/null +++ b/.github/workflows/__export-file-baseline-information.yml @@ -0,0 +1,67 @@ +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# pip install ruamel.yaml && python3 sync.py +# to regenerate this file. + +name: PR Check - Export file baseline information +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GO111MODULE: auto +on: + push: + branches: + - main + - releases/v1 + - releases/v2 + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: {} +jobs: + export-file-baseline-information: + strategy: + matrix: + include: + - os: ubuntu-latest + version: nightly-latest + - os: macos-latest + version: nightly-latest + - os: windows-latest + version: nightly-latest + name: Export file baseline information + timeout-minutes: 45 + runs-on: ${{ matrix.os }} + steps: + - name: Check out repository + uses: actions/checkout@v3 + - name: Prepare test + id: prepare-test + uses: ./.github/prepare-test + with: + version: ${{ matrix.version }} + - uses: ./../action/init + with: + tools: ${{ steps.prepare-test.outputs.tools-url }} + env: + CODEQL_FILE_BASELINE_INFORMATION: true + TEST_MODE: true + - name: Build code + shell: bash + run: ./build.sh + - uses: ./../action/analyze + with: + output: ${{ runner.temp }}/results + env: + CODEQL_FILE_BASELINE_INFORMATION: true + TEST_MODE: true + - name: Upload SARIF + uses: actions/upload-artifact@v3 + with: + name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json + path: ${{ runner.temp }}/results/javascript.sarif + retention-days: 7 + env: + INTERNAL_CODEQL_ACTION_DEBUG_LOC: true diff --git a/pr-checks/checks/export-file-baseline-information.yml b/pr-checks/checks/export-file-baseline-information.yml new file mode 100644 index 000000000..b4e87e126 --- /dev/null +++ b/pr-checks/checks/export-file-baseline-information.yml @@ -0,0 +1,25 @@ +name: "Export file baseline information" +description: "Tests that exporting file baseline information works" +versions: ["nightly-latest"] +steps: + - uses: ./../action/init + with: + tools: ${{ steps.prepare-test.outputs.tools-url }} + env: + CODEQL_FILE_BASELINE_INFORMATION: true + TEST_MODE: true + - name: Build code + shell: bash + run: ./build.sh + - uses: ./../action/analyze + with: + output: "${{ runner.temp }}/results" + env: + CODEQL_FILE_BASELINE_INFORMATION: true + TEST_MODE: true + - name: Upload SARIF + uses: actions/upload-artifact@v3 + with: + name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json + path: "${{ runner.temp }}/results/javascript.sarif" + retention-days: 7