From 21aabbde640eb639b648354bf4300e675f31116a Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Sat, 3 Apr 2021 14:49:52 -0700 Subject: [PATCH] ci(test): validate typescript, run lint only once --- .github/workflows/test.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d7d3df9f..b83fd2bb1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,8 +7,9 @@ name: Test types: - opened - synchronize + jobs: - test: + test_matrix: runs-on: ubuntu-latest strategy: matrix: @@ -16,11 +17,27 @@ jobs: - 10 - 12 - 14 + steps: - uses: actions/checkout@v2 - - name: "Use Node.js ${{ matrix.node_version }}" + - name: Use Node.js ${{ matrix.node_version }} uses: actions/setup-node@v2 with: - node-version: "${{ matrix.node_version }}" + node-version: ${{ matrix.node_version }} + - uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - run: npm ci + - run: npm test --ignore-scripts # run lint only once + + test: + runs-on: ubuntu-latest + needs: test_matrix + steps: + - uses: actions/checkout@v2 - run: npm ci - - run: npm test + - run: npm run lint + - run: npm run test:typescript