Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Apr 18, 2024
0 parents commit f345cef
Show file tree
Hide file tree
Showing 32 changed files with 5,567 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.CRLF.txt]
end_of_line = crlf

[*.noEOL.txt]
insert_final_newline = false

[*.{yaml,yml}]
indent_size = 2

[{package*.json,lerna.json}]
indent_size = 2

[.github/integrations.json]
indent_size = 2

[*.md]
indent_size = 2
trim_trailing_whitespace = false

[config.json]
indent_size = 2

[*.tsx]
indent_size = 2
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto eol=lf
*.txt text eol=lf
*.ts text eol=lf
*.go text eol=lf
*.CRLF.txt text eol=crlf
10 changes: 10 additions & 0 deletions .github/actions/install-build-test/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: install_build_test
description: Install Build and Test
runs:
using: 'composite'
steps:
- shell: bash
run: |
pnpm i
pnpm run build
pnpm test
18 changes: 18 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: setup_node
description: Setup Node, and install Pnpm
inputs:
node-version:
required: false
description: The version of Node to use.
default: '20.x'
runs:
using: 'composite'
steps:
- name: Setup
uses: streetsidesoftware/actions/public/setup-node-pnpm@v1
with:
node-version: ${{ inputs.node-version }}

- name: Install
run: pnpm i
shell: bash
76 changes: 76 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'

on:
workflow_dispatch:
push:
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
schedule:
- cron: '15 13 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['javascript', 'typescript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# 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
# queries: security-extended,security-and-quality

# # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# # If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: '/language:${{matrix.language}}'
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Lint

on:
workflow_dispatch:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Lint
run: pnpm lint

- name: Spell Check
run: pnpm lint:spell
46 changes: 46 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: release-please

on:
workflow_dispatch:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: actions/checkout@v3

- uses: google-github-actions/release-please-action@v4
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

# cspell:ignore noreply

publish:
runs-on: ubuntu-latest
needs:
- release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
# The logic below handles the npm publication:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup

- run: |
pnpm i
pnpm build
# - run: pnpm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.PUBLISH_NPM}}
88 changes: 88 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Test

on:
workflow_dispatch:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
test-node-versions:
runs-on: ${{ matrix.os }}

strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [18.x, 20.x, 21.x]
os:
- ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup
uses: streetsidesoftware/actions/public/setup-node-pnpm@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install - Build - Test
uses: ./.github/actions/install-build-test

test-os:
runs-on: ${{ matrix.os }}

strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [18.x]
os:
- windows-latest
- macos-latest

steps:
- uses: actions/checkout@v3

- name: Setup
uses: streetsidesoftware/actions/public/setup-node-pnpm@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install - Build - Test
uses: ./.github/actions/install-build-test

coverage:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code

runs-on: ${{ matrix.os }}

strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [18.x]
os:
- ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}

- run: pnpm i
- run: pnpm run build
- run: pnpm run coverage

- name: Upload coverage Coveralls
uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057 # 1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3
Loading

0 comments on commit f345cef

Please sign in to comment.