diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbf2699fdb8c..890340b8e50c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -98,7 +98,7 @@ jobs: run: yarn run audit needs: setup - build: + test-unit: runs-on: ${{ matrix.os }} strategy: @@ -121,23 +121,25 @@ jobs: path: ${{ github.workspace }} key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} - - name: build - run: yarn test:fixtures -i + - name: test unit + run: yarn test:unit --coverage - - name: cache fixtures - uses: actions/cache@v1 + - name: codecov + uses: codecov/codecov-action@v1 + if: matrix.os == 'ubuntu-latest' && matrix.node == '10' with: - path: test/fixtures - key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }} + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests needs: setup - lint-app: + build: runs-on: ${{ matrix.os }} strategy: matrix: + # os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest] - node: [12] + node: [10, 12] steps: - uses: actions/setup-node@v1 @@ -153,24 +155,23 @@ jobs: path: ${{ github.workspace }} key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} - - name: restore fixtures + - name: build + run: yarn test:fixtures -i + + - name: cache fixtures uses: actions/cache@v1 with: path: test/fixtures key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }} + needs: setup - - name: lint app - run: yarn lint:app - needs: build - - test-dev: + lint-app: runs-on: ${{ matrix.os }} strategy: matrix: - # os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest] - node: [10, 12] + node: [12] steps: - uses: actions/setup-node@v1 @@ -192,11 +193,11 @@ jobs: path: test/fixtures key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }} - - name: test dev - run: yarn test:dev -w=2 + - name: lint app + run: yarn lint:app needs: build - test-unit: + test-dev: runs-on: ${{ matrix.os }} strategy: @@ -225,15 +226,8 @@ jobs: 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 + - name: test dev + run: yarn test:dev -w=2 needs: build test-e2e: