diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbf2699fdb..890340b8e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -98,6 +98,40 @@ jobs: run: yarn run audit needs: setup + test-unit: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + # os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest] + node: [10, 12] + + steps: + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: checkout + uses: actions/checkout@master + + - name: restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} + + - name: test unit + run: yarn test:unit --coverage + + - name: codecov + uses: codecov/codecov-action@v1 + if: matrix.os == 'ubuntu-latest' && matrix.node == '10' + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests + needs: setup + build: runs-on: ${{ matrix.os }} @@ -196,46 +230,6 @@ jobs: run: yarn test:dev -w=2 needs: build - test-unit: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - # os: [ubuntu-latest, macos-latest, windows-latest] - os: [ubuntu-latest] - node: [10, 12] - - steps: - - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - - name: checkout - uses: actions/checkout@master - - - name: restore workspace cache - uses: actions/cache@v1 - with: - path: ${{ github.workspace }} - key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} - - - name: restore fixtures - uses: actions/cache@v1 - with: - path: test/fixtures - key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }} - - - name: test unit - run: yarn test:unit --coverage - - - name: codecov - uses: codecov/codecov-action@v1 - if: matrix.os == 'ubuntu-latest' && matrix.node == '10' - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: unittests - needs: build - test-e2e: runs-on: ${{ matrix.os }}