Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: move CodeQL tests to default.yaml #1971

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# CodeQL tests apparently have to be deefined in a file
# named default.yaml - this is not well documented
Comment on lines +1 to +2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point me to any documentation that states this odd requirement? If not, I suggest:

Suggested change
# CodeQL tests apparently have to be deefined in a file
# named default.yaml - this is not well documented
# Apparently, CodeQL tests must be defined in a file named default.yaml.
# We cannot find where that requirement is documented, but these tests
# fail with "configurations not found" errors if defined in quick.yaml.

The above suggestion also fixes a misspelling.


name: CodeQL tests

on:
push:
# test commits on this branch and staged commits
branches: [ "master", "auto" ]

pull_request:
# test PRs targeting this branch code
branches: [ "master" ]

jobs:

CodeQL-tests:

runs-on: [ ubuntu-22.04 ]

permissions:
security-events: write

steps:

- name: Install Squid prerequisite Linux packages
run: |
# required for "apt-get build-dep" to work
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 build-dep squid
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3

- name: Build Squid
run: ./test-builds.sh ./test-suite/buildtests/layer-02-maximus.opts

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

28 changes: 0 additions & 28 deletions .github/workflows/quick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,31 +154,3 @@ jobs:
name: build-logs-${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }}
path: btlayer-*.log

CodeQL-tests:

runs-on: [ ubuntu-22.04 ]

permissions:
security-events: write

steps:

- name: Install Squid prerequisite Linux packages
run: |
# required for "apt-get build-dep" to work
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 build-dep squid
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3

- name: Build Squid
run: ./test-builds.sh ./test-suite/buildtests/layer-02-maximus.opts

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Loading