From 53e4b246a49c132490edac90beb884e02f432164 Mon Sep 17 00:00:00 2001 From: dresber Date: Sun, 10 May 2026 20:38:24 +0200 Subject: [PATCH] add node checks as workflow --- .gitea/workflows/node-checks.yml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitea/workflows/node-checks.yml diff --git a/.gitea/workflows/node-checks.yml b/.gitea/workflows/node-checks.yml new file mode 100644 index 0000000..949c267 --- /dev/null +++ b/.gitea/workflows/node-checks.yml @@ -0,0 +1,42 @@ +name: Reusable Node Checks + +on: + workflow_call: + inputs: + node_version: + type: string + default: "22" + install_command: + type: string + default: "npm ci" + typecheck_command: + type: string + default: "npm run typecheck" + test_command: + type: string + default: "npm test" + build_command: + type: string + default: "npm run build" + +jobs: + check: + runs-on: docker + container: + image: node:${{ inputs.node_version }}-alpine + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: ${{ inputs.install_command }} + + - name: Typecheck + run: ${{ inputs.typecheck_command }} + + - name: Run tests + run: ${{ inputs.test_command }} + + - name: Build + run: ${{ inputs.build_command }} \ No newline at end of file