Skip to content

Commit 7420f88

Browse files
committed
Add test to check codeql-bundle-all
1 parent a98b9bd commit 7420f88

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed

.github/actions/prepare-test/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ inputs:
44
version:
55
description: "The version of the CodeQL CLI to use. Can be 'latest', 'default', 'nightly-latest', 'nightly-YYYY-MM-DD', or 'stable-YYYY-MM-DD'."
66
required: true
7+
require-codeql-bundle-all:
8+
description: "If true, we output a tools URL with codeql-bundle-all.tar.gz file rather than platform-specific URL"
9+
default: 'false'
10+
required: false
711
outputs:
812
tools-url:
913
description: "The value that should be passed as the 'tools' input of the 'init' step."
@@ -24,7 +28,9 @@ runs:
2428
run: |
2529
set -e # Fail this Action if `gh release list` fails.
2630
27-
if [[ "$RUNNER_OS" == "Linux" ]]; then
31+
if [[ ${{ inputs.require-codeql-bundle-all }} == "true" ]]; then
32+
artifact_name="codeql-bundle.tar.gz"
33+
elif [[ "$RUNNER_OS" == "Linux" ]]; then
2834
artifact_name="codeql-bundle-linux64.tar.gz"
2935
elif [[ "$RUNNER_OS" == "macOS" ]]; then
3036
artifact_name="codeql-bundle-osx64.tar.gz"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: 'PR Check - CodeQL Bundle All'
2+
env:
3+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4+
GO111MODULE: auto
5+
# Disable Kotlin analysis while it's incompatible with Kotlin 1.8, until we find a
6+
# workaround for our PR checks.
7+
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- releases/v2
13+
pull_request:
14+
types:
15+
- opened
16+
- synchronize
17+
- reopened
18+
- ready_for_review
19+
workflow_dispatch: {}
20+
jobs:
21+
test-codeql-bundle-all:
22+
strategy:
23+
matrix:
24+
include:
25+
- os: ubuntu-latest
26+
version: nightly-latest
27+
name: 'CodeQL Bundle All'
28+
permissions:
29+
contents: read
30+
security-events: write
31+
timeout-minutes: 45
32+
runs-on: ${{ matrix.os }}
33+
steps:
34+
- name: Check out repository
35+
uses: actions/checkout@v3
36+
- name: Prepare test
37+
id: prepare-test
38+
uses: ./.github/actions/prepare-test
39+
with:
40+
version: ${{ matrix.version }}
41+
require-codeql-bundle-all: true
42+
- uses: ./../action/init
43+
with:
44+
tools: ${{ steps.prepare-test.outputs.tools-url }}
45+
- uses: ./../action/.github/actions/setup-swift
46+
with:
47+
codeql-path: ${{ steps.init.outputs.codeql-path }}
48+
- name: Build code
49+
shell: bash
50+
run: ./build.sh
51+
- uses: ./../action/analyze
52+
with:
53+
upload-database: false
54+
env:
55+
CODEQL_ACTION_TEST_MODE: true

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy