From bb980c9263cbcbd069b39d13a016a9285b2759ee Mon Sep 17 00:00:00 2001 From: estebanthi Date: Sun, 4 Jan 2026 13:16:54 +0100 Subject: [PATCH] node ci --- .github/workflows/node-ci.yml | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/node-ci.yml diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml new file mode 100644 index 0000000..d304984 --- /dev/null +++ b/.github/workflows/node-ci.yml @@ -0,0 +1,52 @@ +name: Node CI (Lint) + +on: + workflow_call: + inputs: + node_version: + type: string + default: "20" + pnpm_version: + type: string + default: "10.23.0" + working_directory: + type: string + default: "." + cache_dependency_path: + type: string + default: "pnpm-lock.yaml" + lint_command: + type: string + default: "pnpm lint" + +jobs: + lint: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node_version }} + cache: pnpm + cache-dependency-path: ${{ inputs.cache_dependency_path }} + + - name: Enable corepack + run: corepack enable + working-directory: ${{ inputs.working_directory }} + + - name: Install pnpm + run: corepack prepare pnpm@${{ inputs.pnpm_version }} --activate + working-directory: ${{ inputs.working_directory }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + working-directory: ${{ inputs.working_directory }} + + - name: Run lint + run: ${{ inputs.lint_command }} + working-directory: ${{ inputs.working_directory }}