From 400dbc5555652a42248e2f6f8aad87412d3447f0 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Wed, 9 Oct 2019 00:12:52 +0900 Subject: [PATCH] gha: Add step to read .nvmrc --- .github/workflows/test.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3903a91..00a7df7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,10 +16,14 @@ jobs: with: fetch-depth: 1 - - name: setup node + - name: Read .nvmrc + run: echo ::set-output name=NVMRC::$(cat .nvmrc) + id: nvm + + - name: Setup node uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '${{ steps.nvm.outputs.NVMRC }}' - name: Install dependencies run: npm install @@ -33,7 +37,8 @@ jobs: - name: Test run: npm test - - uses: actions/upload-artifact@master + - name: Upload test coverage + uses: actions/upload-artifact@master with: name: coverage path: coverage