Skip to content

CI: move CodeQL tests to default.yaml #3825

CI: move CodeQL tests to default.yaml

CI: move CodeQL tests to default.yaml #3825

Workflow file for this run

# CodeQL tests apparently have to be deefined in a file
# named default.yaml - this is not well documented
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