Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Report errors and problems
title: ''
labels: bug
assignees: ''
---

**Versions Used**

<!-- The ver. -->

**Description**

<!-- A clear and concise description of the problem. -->

**How to reproduce**

<!-- Code, config and/or steps needed to reproduce the problem. -->

**Possible Solution**

<!--- Optional: only if you have suggestions on a fix/reason for the bug -->

**Additional context**

<!-- Optional: any other context about the problem: log messages, screenshots, etc. -->
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Documentation Issue
about: Missing, misleading or incomplete documentation issues
title: ''
labels: docs
assignees: ''
---

**Documentation issue**

<!-- Before opening a new issue, please make sure you already checked -->
<!-- our documentation. -->
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Ideas for new features and improvements
title: ''
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**

<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**

<!-- Add any other context or screenshots about the feature request here. -->
36 changes: 36 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes -->

## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Documentation:

<!--- Upon PR's approval, link the wiki page for your corresponding changes here. -->

## Checklist:

- [ ] I have updated the documentation accordingly.
- [ ] I have assigned the correct milestone or created one if non-existent.
- [ ] I have correctly labeled this pull request.
- [ ] I have linked the corresponding issue in this description.
- [ ] I have requested a review from at least 2 reviewers
- [ ] I have checked the base branch of this pull request
- [ ] I have checked my code for any possible security vulnerabilities
36 changes: 36 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Commits

on:
workflow_call:
inputs:
ref:
required: true
type: string

permissions:
contents: read

jobs:
lint-commits:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
name: Validate Commits

steps:
- name: Harden runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref }}
fetch-depth: 0

- name: Inspect Commits
uses: mridang/action-commit-lint@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/depcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dependency Review

on:
pull_request:

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Review Dependencies
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
43 changes: 0 additions & 43 deletions .github/workflows/issues.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Linting

on:
workflow_call:
inputs:
ref:
required: true
type: string
commit_changes:
required: false
type: boolean
default: false

defaults:
run:
working-directory: ./

permissions:
contents: read

jobs:
lint-format:
permissions:
contents: write
runs-on: ubuntu-latest
name: Reformat Code

steps:
- name: Harden runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref }}

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'

- name: Install Dependencies
run: npm ci --no-progress

- name: Run Formatter
run: npm run format

- name: Commit Changes
if: ${{ inputs.commit_changes == true }}
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
with:
commit_message: 'style: Apply automated code formatting [skip ci]'
commit_options: '--no-verify'
repository: .
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
94 changes: 94 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Pipeline

on:
push:
branches:
- main
- master
- next
- next-major
- beta
- alpha
- '[0-9]*.x'
- develop
- 'release/**'
- 'hotfix/**'
- 'support/**'
pull_request:

permissions:
contents: write
actions: read
checks: write
pull-requests: write

jobs:
lint-commits:
name: Run Commitlint Checks
if: github.event_name == 'pull_request'
uses: ./.github/workflows/commitlint.yml
with:
ref: ${{ github.event.pull_request.head.sha }}
secrets: inherit

code-style:
name: Run Linter Formatter
uses: ./.github/workflows/linting.yml
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
commit_changes: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
secrets: inherit

type-check:
name: Run Type Checks
uses: ./.github/workflows/typecheck.yml
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
secrets: inherit

run-tests:
name: Run Test Suite
uses: ./.github/workflows/test.yml
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
secrets: inherit

code-inspection:
name: Run Qodana Inspections
needs: run-tests
if: ${{ always() }}
uses: ./.github/workflows/qodana.yml
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
secrets: inherit

check-deps:
name: Run Dependency Checks
uses: ./.github/workflows/unused.yml
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
secrets: inherit

all-passed:
name: Check Build Status
runs-on: ubuntu-latest
if: always()
needs:
- lint-commits
- code-style
- type-check
- run-tests
- code-inspection
- check-deps
steps:
- name: Harden runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- name: Verify all jobs passed
run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more jobs failed or were cancelled."
exit 1
fi
Loading
Loading