Skip to content

Commit b131984

Browse files
committed
Add dependabot.yml, codeql.yml, and node-js.yml
1 parent ab821c7 commit b131984

File tree

3 files changed

+166
-0
lines changed

3 files changed

+166
-0
lines changed

.github/dependabot.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm"
9+
directory: "/"
10+
schedule:
11+
interval: monthly
12+
target-branch: "main"
13+
allow:
14+
- dependency-type: "direct"
15+
versioning-strategy: increase
16+
commit-message:
17+
prefix: "dependabot npm update"
18+
include: "scope"
19+
groups:
20+
development-dependencies:
21+
applies-to: version-updates
22+
dependency-type: "development"
23+
update-types:
24+
- "major"
25+
- "minor"
26+
- "patch"
27+
development-dependencies-security:
28+
applies-to: security-updates
29+
dependency-type: "development"
30+
update-types:
31+
- "major"
32+
- "minor"
33+
- "patch"
34+
production-dependencies:
35+
applies-to: version-updates
36+
dependency-type: "production"
37+
update-types:
38+
- "major"
39+
- "minor"
40+
- "patch"
41+
production-dependencies-security:
42+
applies-to: security-updates
43+
dependency-type: "production"
44+
update-types:
45+
- "major"
46+
- "minor"
47+
- "patch"
48+
49+
- package-ecosystem: github-actions
50+
directory: "/"
51+
schedule:
52+
interval: monthly
53+
target-branch: "development-main"
54+
commit-message:
55+
prefix: "dependabot github-action update"
56+
include: "scope"

.github/workflows/codeql.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
7+
name: "CodeQL"
8+
9+
on:
10+
push:
11+
branches:
12+
- "main"
13+
pull_request:
14+
branches:
15+
- "main"
16+
17+
jobs:
18+
analyze:
19+
name: Analyze
20+
# Runner size impacts CodeQL analysis time. To learn more, please see:
21+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
22+
# - https://gh.io/supported-runners-and-hardware-resources
23+
# - https://gh.io/using-larger-runners
24+
# Consider using larger runners for possible analysis time improvements.
25+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
26+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'javascript-typescript' ]
36+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
37+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
38+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
39+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
40+
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
45+
# Initializes the CodeQL tools for scanning.
46+
- name: Initialize CodeQL
47+
uses: github/codeql-action/init@v3
48+
with:
49+
languages: ${{ matrix.language }}
50+
# If you wish to specify custom queries, you can do so here or in a config file.
51+
# By default, queries listed here will override any specified in a config file.
52+
# Prefix the list here with "+" to use these queries and those in the config file.
53+
54+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55+
# queries: security-extended,security-and-quality
56+
57+
58+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
59+
# If this step fails, then you should remove it and run the build manually (see below)
60+
- name: Autobuild
61+
uses: github/codeql-action/autobuild@v3
62+
63+
# ℹ️ Command-line programs to run using the OS shell.
64+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
65+
66+
# If the Autobuild fails above, remove it and uncomment the following three lines.
67+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
68+
69+
# - run: |
70+
# echo "Run, Build Application using script"
71+
# ./location_of_script_within_repo/buildscript.sh
72+
73+
- name: Perform CodeQL Analysis
74+
uses: github/codeql-action/analyze@v3
75+
with:
76+
category: "/language:${{matrix.language}}"

.github/workflows/node-js.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: "Node.js Build"
5+
6+
on:
7+
push:
8+
branches:
9+
- "main"
10+
pull_request:
11+
branches:
12+
- "main"
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
matrix:
21+
node-version: [ 18.x, 20.x, 22.x ]
22+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: 'npm'
31+
- run: npm ci
32+
- run: npm run lint
33+
- run: npm run build
34+
- run: npm run prod

0 commit comments

Comments
 (0)