Skip to content

Commit

Permalink
feat: add github ci configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
SudharakaP committed May 3, 2024
1 parent 7bd1552 commit 43c99ca
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Setup Project
description: Installs Node.js, NPM and dependencies and sets up the project

runs:
using: 'composite'
steps:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
cache: 'npm'

- name: Install dependencies
shell: bash
run: npm ci --prefer-offline --no-audit --progress=false
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: 'weekly'
open-pull-requests-limit: 10

- package-ecosystem: github-actions
directory: '/'
schedule:
interval: 'weekly'
open-pull-requests-limit: 10
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Continuous Integration

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5

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

- name: Setup project
uses: ./.github/actions/setup-project

- run: npm run lint:quiet

prettier:
runs-on: ubuntu-latest
timeout-minutes: 5

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

- name: Setup project
uses: ./.github/actions/setup-project

- run: npm run prettier:check
36 changes: 36 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'CodeQL'

on:
push:
branches:
- main

pull_request:
types:
- opened
- synchronize
- reopened

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write

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

- name: Setup project
uses: ./.github/actions/setup-project

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

0 comments on commit 43c99ca

Please sign in to comment.