Skip to content

Commit

Permalink
ci: add ci and codeql workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
derklaro committed Jan 14, 2025
1 parent e0c25b5 commit e0dc9c3
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI
on:
push:
branches: [ "**" ]
tags-ignore: [ "**" ]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
cancel-in-progress: true
group: ci-${{ github.event.pull_request.number || github.ref }}

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: latest

- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 9
run_install: true

- name: Run CI
run: pnpm run ci
51 changes: 51 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
tags-ignore: [ "**" ]
pull_request:
schedule:
- cron: '00 2 * * *'

concurrency:
cancel-in-progress: true
group: cq-${{ github.event.pull_request.number || github.job }}

permissions:
contents: read
security-events: write

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/heads/renovate/') }}

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

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: latest

- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 9
run_install: true

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
tools: linked
languages: "javascript-typescript"

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "tsc -b && vite build",
"lint": "biome lint && eslint .",
"format": "biome format --fix",
"preview": "vite preview"
"preview": "vite preview",
"ci": "biome ci && eslint . --quiet --no-color && pnpm run build"
},
"dependencies": {
"@tanstack/react-query": "^5.64.0",
Expand Down

0 comments on commit e0dc9c3

Please sign in to comment.