refactor: bring in new onboarding mechanics #3
Workflow file for this run
This file contains hidden or 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 Analysis" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
schedule: | |
- cron: "0 12 * * 1" | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
jobs: | |
analyze: | |
name: AnalyzeX | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ["typescript", "kotlin"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
queries: security-extended | |
# Explicitly set build mode for Kotlin | |
build-mode: ${{ matrix.language == 'kotlin' && 'autobuild' || 'none' }} | |
# Set up environment based on language | |
- name: Set up Node.js | |
if: matrix.language == 'typescript' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Install TypeScript dependencies | |
if: matrix.language == 'typescript' | |
run: | | |
npm ci || yarn install | |
# Ensure TypeScript is available for the build | |
npm list typescript || npm install --no-save typescript | |
continue-on-error: true | |
# Optional TypeScript build step | |
- name: Build TypeScript | |
if: matrix.language == 'typescript' | |
run: | | |
npm run tsc || npm run build || echo "No TypeScript build script found" | |
continue-on-error: true | |
- name: Set up JDK | |
if: matrix.language == 'kotlin' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
# For Kotlin, we need to ensure the Gradle wrapper is executable | |
- name: Make Gradle wrapper executable | |
if: matrix.language == 'kotlin' | |
run: | | |
cd app/android | |
chmod +x ./gradlew | |
continue-on-error: false | |
- name: Build Android (Kotlin) | |
if: matrix.language == 'kotlin' | |
run: | | |
cd app/android | |
# Export CODEQL_EXTRACTOR_JAVA_BUILD_COMMAND to tell CodeQL to use our build command | |
export CODEQL_EXTRACTOR_JAVA_BUILD_COMMAND="./gradlew assembleDebug" | |
./gradlew assembleDebug --no-daemon | |
continue-on-error: false | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{ matrix.language }}" |