Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create CodeQL workflow #393

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CodeQL

on:
workflow_dispatch:
push:
branches:
- "*.*.*"
- "main"
- "master"
pull_request:
branches: "*"
schedule:
- cron: '16 23 * * 4'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write
packages: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
22 changes: 8 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: Lint Changes
name: ESLint

on:
workflow_dispatch:
push:
branches:
- "*.*.*"
- "main"
- "master"
pull_request:
branches: "*"
paths:
- "src/**"
- "public/**"
- "*.json"
- "*.js"
- "*.jsx"
- "*.ts"
- "*.tsx"

permissions:
contents: read
Expand Down Expand Up @@ -39,10 +36,7 @@ jobs:
${{ runner.os }}-modules-

- name: Install Dependencies
run: npm install --legacy-peer-deps
run: npm install

- name: Run Typecheck
run: npm run typecheck

- name: Run Linter
- name: Run ESLint
run: npm run lint:ci
17 changes: 7 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: Test Changes
name: Jest

on:
workflow_dispatch:
push:
branches:
- "*.*.*"
- "main"
- "master"
pull_request:
branches: "*"
paths:
- "src/**"
- "public/**"
- "*.json"
- "*.js"
- "*.jsx"
- "*.ts"
- "*.tsx"

permissions:
contents: read
Expand Down Expand Up @@ -39,7 +36,7 @@ jobs:
${{ runner.os }}-modules-

- name: Install Dependencies
run: npm install --legacy-peer-deps
run: npm install

- name: Run Jest
run: npm run test:ci
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: TypeScript

on:
workflow_dispatch:
push:
branches:
- "*.*.*"
- "main"
- "master"
pull_request:
branches: "*"

permissions:
contents: read

jobs:
typecheck:
name: Typecheck
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"

- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-modules-

- name: Install Dependencies
run: npm install

- name: Run Typecheck
run: npm run typecheck
Loading