From 9561928470e3a0d192bee873ebda8f1e2d067cc3 Mon Sep 17 00:00:00 2001 From: Maxim Babichev Date: Sun, 20 Aug 2023 14:12:28 +0300 Subject: [PATCH] Create npm-test.yml Signed-off-by: Maxim Babichev --- .github/workflows/npm-test.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/npm-test.yml 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