diff --git a/.github/workflows/npm-test.yml b/.github/workflows/npm-test.yml new file mode 100644 index 0000000..b96deb6 --- /dev/null +++ b/.github/workflows/npm-test.yml @@ -0,0 +1,30 @@ +name: npm run test + +on: + workflow_call: + inputs: + nodejs: + type: string + default: '20.x' + +jobs: + units: + runs-on: ubuntu-latest + + env: + NODE_ENV: production + + steps: + - uses: actions/checkout@v3 + + - name: Setup Node ${{ inputs.nodejs }} + uses: actions/setup-node@v3 + with: + node-version: ${{ inputs.nodejs }} + cache: npm + + - name: "install" + run: npm ci --production + + - name: "test" + run: npm run test