Refactor code structure for improved readability and maintainability #16903
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Common Jobs | |
| on: | |
| pull_request: | |
| push: | |
| branches-ignore: | |
| - 'hotfix-*' # excludes hotfix branches | |
| - 'release' | |
| jobs: | |
| helm-lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| CI_PIPELINE_ID: ${{github.run_number}} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Install Helm | |
| run: | | |
| curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
| - name: Lint Helm Chart | |
| run: | | |
| helm lint ./HelmChart/Public/oneuptime | |
| helm lint ./HelmChart/Public/kubernetes-agent | |
| js-lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| CI_PIPELINE_ID: ${{github.run_number}} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y curl gcc | |
| - run: sudo apt-get install -y build-essential | |
| - run: sudo apt-get install -y nodejs | |
| - run: npm install | |
| - run: npm run lint | |
| - name: Validate locale files (key parity + placeholders) | |
| run: npm run i18n:validate | |
| - name: Show how to fix lint | |
| if: ${{ failure() }} | |
| run: echo "Please run 'npm run fix' to auto-fix lint, and 'npm run i18n:validate' locally to see any missing/extra locale keys or broken placeholders." |