CodeQL Advanced #57
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 Advanced | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - 'feat/**' | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| - 'feat/**' | |
| schedule: | |
| - cron: '0 3 * * 1' | |
| concurrency: | |
| group: codeql-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| security-events: write | |
| actions: read | |
| jobs: | |
| analyze: | |
| name: Analyze (${{ matrix.language }}) | |
| runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - language: javascript-typescript | |
| build-mode: none | |
| - language: python | |
| build-mode: none | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| if: matrix.language == 'python' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Setup uv | |
| if: matrix.language == 'python' | |
| uses: astral-sh/setup-uv@v1 | |
| with: | |
| python-version: '3.13' | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| uv.lock | |
| pyproject.toml | |
| - name: Sync Python dependencies | |
| if: matrix.language == 'python' | |
| run: uv sync --frozen | |
| - name: Export PYTHONPATH | |
| if: matrix.language == 'python' | |
| run: echo "PYTHONPATH=${{ github.workspace }}" >> "$GITHUB_ENV" | |
| - name: Setup Node (Corepack) | |
| if: matrix.language == 'javascript-typescript' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| check-latest: true | |
| - name: Enable Corepack | |
| if: matrix.language == 'javascript-typescript' | |
| run: corepack enable | |
| - name: Activate Yarn 1.22.22 | |
| if: matrix.language == 'javascript-typescript' | |
| run: corepack prepare yarn@1.22.22 --activate | |
| - name: Install frontend dependencies | |
| if: matrix.language == 'javascript-typescript' | |
| working-directory: dlsite_classification_web | |
| run: yarn install --frozen-lockfile | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: ${{ matrix.language }} | |
| build-mode: ${{ matrix.build-mode }} | |
| config-file: .github/codeql/codeql-config.yml | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: '/language:${{ matrix.language }}' | |
| upload-database: false | |
| continue-on-error: true |