diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..53fe06d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,36 @@ +--- +name: Bug Report +about: Report a bug to help us improve the Tazama platform +title: '[BUG] ' +labels: bug +assignees: '' +--- + +## Bug Report + +### Description +Provide a clear and concise description of the bug. + +### Steps to Reproduce +1. Step 1 +2. Step 2 +3. Step 3 + +### Expected Behavior +Describe what you expected to happen. + +### Actual Behavior +Describe what actually happened, including any error messages or logs. + +### Environment +- **Service/Component**: (e.g., config-service, rule-processor) +- **Environment**: (e.g., EKS, Docker, local) +- **Version/Commit**: (e.g., v0.0.1, commit hash) +- **Operating System**: (e.g., Linux, macOS) +- **Dependencies**: (e.g., Node.js, Java, Redis, Kafka) + +### Screenshots/Logs +If applicable, attach screenshots or logs to help explain the issue. + +### Additional Context +Add any other context about the problem here (e.g., related to Helm charts, specific configurations). diff --git a/.github/ISSUE_TEMPLATE/development-item.md b/.github/ISSUE_TEMPLATE/development-item.md new file mode 100644 index 0000000..325725e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/development-item.md @@ -0,0 +1,32 @@ +--- +name: Development Item +about: Propose a new development task or improvement for the Tazama platform +title: '[DEV] ' +labels: enhancement +assignees: '' +--- + +## Development Item + +### Description +Provide a clear and concise description of the development task or improvement. + +### Objective +What is the goal of this task? (e.g., improve performance, add monitoring, refactor code) + +### Proposed Changes +List the specific changes or features to implement: +- Change 1 +- Change 2 +- Change 3 + +### Affected Components +Specify which Tazama components or services are involved (e.g., config-service, Helm charts). + +### Acceptance Criteria +Define the criteria for considering this task complete: +- Criterion 1 +- Criterion 2 + +### Additional Context +Add any other context, such as related issues, dependencies, or technical considerations. diff --git a/.github/ISSUE_TEMPLATE/failing-tests.md b/.github/ISSUE_TEMPLATE/failing-tests.md new file mode 100644 index 0000000..bdc7562 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/failing-tests.md @@ -0,0 +1,40 @@ +--- +name: Failing Test +about: Report a failing test case in the Tazama platform +title: '[TEST] ' +labels: test-failure +assignees: '' +--- + +## Failing Test + +### Description +Describe the failing test case and its purpose. + +### Test Details +- **Test Name**: (e.g., testConfigServiceStartup) +- **Test File/Location**: (e.g., tests/config-service.test.js) +- **Test Framework**: (e.g., Jest, JUnit) + +### Steps to Reproduce +1. Run command: (e.g., `npm test`) +2. Specify test: (e.g., `jest tests/config-service.test.js`) +3. Observe failure + +### Expected Behavior +Describe what the test should do when passing. + +### Actual Behavior +Describe the failure, including error messages or stack traces. + +### Environment +- **Service/Component**: (e.g., config-service) +- **Version/Commit**: (e.g., v0.0.1, commit hash) +- **Operating System**: (e.g., Linux, macOS) +- **Dependencies**: (e.g., Node.js, Java, test libraries) + +### Logs/Screenshots +Attach test output, logs, or screenshots of the failure. + +### Additional Context +Add any other context, such as recent code changes or related issues. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..c72c23a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,29 @@ +--- +name: Feature Request +about: Suggest a new feature or enhancement for the Tazama platform +title: '[FEATURE] ' +labels: feature +assignees: '' +--- + +## Feature Request + +### Description +Provide a clear and concise description of the feature or enhancement. + +### Use Case +Explain the problem this feature solves or the benefit it provides. + +### Proposed Solution +Describe the proposed feature or solution in detail: +- Feature 1 +- Feature 2 + +### Affected Components +Specify which Tazama components or services would be impacted (e.g., config-service, UI, Helm charts). + +### Alternatives Considered +List any alternative solutions or workarounds you’ve considered. + +### Additional Context +Add any other context, such as related issues, user stories, or technical considerations. diff --git a/.github/workflows/njsscan.yml b/.github/workflows/njsscan.yml new file mode 100644 index 0000000..d1bddf2 --- /dev/null +++ b/.github/workflows/njsscan.yml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: Apache-2.0 + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow integrates njsscan with GitHub's Code Scanning feature +# nodejsscan is a static security code scanner that finds insecure code patterns in your Node.js applications + +# Please do not attempt to edit this flow without the direct consent from the DevOps team. This file is managed centrally. + +name: njsscan sarif + +on: + push: + branches: [ "dev", "main" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "dev", "main" ] + schedule: + - cron: '17 17 * * 1' + +permissions: + contents: read + +jobs: + njsscan: + if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + runs-on: ubuntu-latest + name: njsscan code scanning + steps: + - name: Checkout the code + uses: actions/checkout@v4 + - name: nodejsscan scan + id: njsscan + uses: ajinabraham/njsscan-action@d58d8b2f26322cd35a9efb8003baac517f226d81 + with: + args: '. --sarif --output results.sarif || true' + - name: Upload njsscan report + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..10aa456 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: Apache-2.0 + +# 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: Node.js CI + +env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_SCOPE: "@frmscoe" + NPM_REGISTRY: "https://npm.pkg.github.com/" + NODE_ENV: 'test' + STARTUP_TYPE: 'nats' + +on: + push: + branches: [ "dev", "main" ] + pull_request: + branches: [ "dev", "main" ] +jobs: + build: + runs-on: ubuntu-latest + name: run build + strategy: + matrix: + node-version: [16, 20] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + registry-url: ${{ env.NPM_REGISTRY }} + scope: ${{ env.NPM_SCOPE }} + - name: Install dependencies + run: npm ci + - name: Run build + run: npm run build + + lint: + runs-on: ubuntu-latest + name: check style + strategy: + matrix: + node-version: [20] + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + registry-url: ${{ env.NPM_REGISTRY }} + scope: ${{ env.NPM_SCOPE }} + - name: Install dependencies + run: npm ci + - name: Check linting + run: npm run lint + - name: Check formatting + run: npm run lint:prettier + + test: + runs-on: ubuntu-latest + name: check tests + strategy: + matrix: + node-version: [20] + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + registry-url: ${{ env.NPM_REGISTRY }} + scope: ${{ env.NPM_SCOPE }} + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm test