chore(deps): update pnpm to v10.33.2 (#365) #622
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| env: | |
| # renovate: datasource=node-version depName=node | |
| NODE_VERSION: 24.15.0 | |
| jobs: | |
| discovery: | |
| name: Discovery | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Build matrix from charts/* containing Chart.yaml | |
| id: set-matrix | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mapfile -t dirs < <(find charts -mindepth 1 -maxdepth 2 -type f -name Chart.yaml -print0 | xargs -0 -n1 dirname | sort -u) | |
| json='{"include":[' | |
| first=1 | |
| for d in "${dirs[@]}"; do | |
| if [[ $first -eq 1 ]]; then first=0; else json+=","; fi | |
| json+="{\"working-directory\":\"$d\"}" | |
| done | |
| json+="]}" | |
| echo "matrix=$json" >> "$GITHUB_OUTPUT" | |
| echo "Discovered charts matrix: $json" | |
| vitest: | |
| name: Run Vitest | |
| runs-on: ubuntu-24.04 | |
| needs: discovery | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| - name: Install dev dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Prettier check | |
| run: pnpm run prettier:check | |
| - name: Run unit tests (vitest) | |
| run: pnpm run test | |
| helm-tests: | |
| name: Helm Chart Unit Tests | |
| needs: discovery | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.discovery.outputs.matrix) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0 | |
| with: | |
| # renovate: datasource=github-releases depName=helm/helm | |
| version: v3.18.6 | |
| - name: Install helm-unittest plugin | |
| run: helm plugin install https://github.com/helm-unittest/helm-unittest | |
| - name: Run Helm chart unit tests | |
| working-directory: ${{ matrix.working-directory }} | |
| run: | | |
| helm unittest -f "templates/tests/**/*.yaml" . | |
| gather-results: | |
| name: Result | |
| runs-on: ubuntu-latest | |
| needs: | |
| - vitest | |
| - helm-tests | |
| if: always() | |
| steps: | |
| - name: Evaluate job results | |
| shell: bash | |
| run: | | |
| declare -A results | |
| results[vitest]="${{ needs.vitest.result }}" | |
| results[helm-tests]="${{ needs.helm-tests.result }}" | |
| echo "Results: ${results[@]}" | |
| failed=0 | |
| for k in "${!results[@]}"; do | |
| v="${results[$k]}" | |
| echo "$k => $v" | |
| if [[ "$v" != "success" ]]; then | |
| failed=1 | |
| fi | |
| done | |
| if [[ $failed -ne 0 ]]; then | |
| echo "One or more jobs failed. Failing gather-results." | |
| exit 1 | |
| fi | |
| echo "All jobs succeeded." |