Refactor BiometricHelper #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL Security Analysis" | |
on: | |
push: | |
branches: [ "main", "master" ] # Scans code on pushes to main or master | |
pull_request: | |
branches: [ "main", "master" ] # Scans pull requests to main or master | |
schedule: | |
- cron: '36 2 * * 5' # Runs scheduled scans every Friday at 2:36 AM UTC | |
jobs: | |
analyze: | |
name: Analyze (${{ matrix.language }}) | |
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |
permissions: | |
security-events: write # Required to upload scanning results | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- language: java-kotlin # Analyzes Java and Kotlin code | |
build-mode: autobuild # Automatically builds the project | |
steps: | |
# Step 1: Checkout repository | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
# Step 2: Set up JDK | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "11" | |
distribution: "temurin" | |
# Step 3: Initialize CodeQL | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
build-mode: ${{ matrix.build-mode }} | |
# Optionally specify custom queries (uncomment if needed): | |
# queries: security-extended,security-and-quality | |
# Step 4: Install dependencies and build the project | |
- name: Install Dependencies | |
run: ./gradlew dependencies | |
- name: Build Project | |
run: ./gradlew build | |
# Step 5: Run Unit Tests | |
- name: Run Unit Tests | |
run: ./gradlew test | |
# Step 6: Save Test Results | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: build/test-results/test/ | |
# Step 7: Perform CodeQL analysis | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{ matrix.language }}" |