Skip to content

CodeQL Analysis

CodeQL Analysis #305

Workflow file for this run

name: CodeQL Analysis
on:
push:
branches:
- 'main'
paths:
- '.github/workflows/codeql.yml'
- 'Package.*'
- 'Sources/**'
- '!**/*.docc/**'
pull_request:
branches:
- 'main'
schedule:
- cron: '0 20 * * *'
jobs:
analyze:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language:
- swift
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Setup Swift
if: ${{ matrix.language == 'swift' }}
uses: swift-actions/setup-swift@v1
with:
swift-version: '5.8'
- name: Build Swift package
if: ${{ matrix.language == 'swift' }}
run: swift build
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"