ci: use build artifacts and run dev tests in band (#8785)

This commit is contained in:
Daniel Roe 2021-02-07 22:25:51 +00:00 committed by GitHub
parent fec6e7a607
commit b2fe40980f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 16 deletions

View File

@ -191,11 +191,11 @@ jobs:
- name: build - name: build
run: yarn test:fixtures -i run: yarn test:fixtures -i
- name: cache fixtures - name: Save fixtures
uses: actions/cache@v2 uses: actions/upload-artifact@v2
with: with:
name: fixtures-${{ matrix.os }}-node-v${{ matrix.node }}
path: test/fixtures path: test/fixtures
key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }}
needs: setup needs: setup
lint-app: lint-app:
@ -225,10 +225,10 @@ jobs:
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
- name: restore fixtures - name: restore fixtures
uses: actions/cache@v2 uses: actions/download-artifact@v2
with: with:
name: fixtures-${{ matrix.os }}-node-v${{ matrix.node }}
path: test/fixtures path: test/fixtures
key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }}
- name: lint app - name: lint app
run: yarn lint:app run: yarn lint:app
@ -262,13 +262,13 @@ jobs:
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
- name: restore fixtures - name: restore fixtures
uses: actions/cache@v2 uses: actions/download-artifact@v2
with: with:
name: fixtures-${{ matrix.os }}-node-v${{ matrix.node }}
path: test/fixtures path: test/fixtures
key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }}
- name: test dev - name: test dev
run: yarn test:dev -w=2 run: yarn test:dev
needs: build needs: build
test-e2e: test-e2e:
@ -299,10 +299,10 @@ jobs:
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
- name: restore fixtures - name: restore fixtures
uses: actions/cache@v2 uses: actions/download-artifact@v2
with: with:
name: fixtures-${{ matrix.os }}-node-v${{ matrix.node }}
path: test/fixtures path: test/fixtures
key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }}
- name: test e2e - name: test e2e
run: yarn test:e2e run: yarn test:e2e

View File

@ -118,11 +118,11 @@ jobs:
- name: build - name: build
run: yarn test:fixtures run: yarn test:fixtures
- name: cache fixtures - name: Save fixtures
uses: actions/cache@v2 uses: actions/upload-artifact@v2
with: with:
name: fixtures-${{ matrix.os }}-node-v${{ matrix.node }}
path: test/fixtures path: test/fixtures
key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }}
needs: setup needs: setup
test-dev: test-dev:
@ -155,10 +155,10 @@ jobs:
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }} key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
- name: restore fixtures - name: restore fixtures
uses: actions/cache@v2 uses: actions/download-artifact@v2
with: with:
name: fixtures-${{ matrix.os }}-node-v${{ matrix.node }}
path: test/fixtures path: test/fixtures
key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }}
- name: test dev - name: test dev
run: yarn test:dev run: yarn test:dev

View File

@ -25,7 +25,7 @@
"nuxt": "jiti ./packages/cli/bin/nuxt-cli.js", "nuxt": "jiti ./packages/cli/bin/nuxt-cli.js",
"pkg": "jiti ./scripts/pkg.js", "pkg": "jiti ./scripts/pkg.js",
"test": "yarn test:fixtures && yarn test:dev && yarn test:unit && test:types", "test": "yarn test:fixtures && yarn test:dev && yarn test:unit && test:types",
"test:dev": "jest test/dev --forceExit", "test:dev": "jest test/dev --forceExit --runInBand",
"test:e2e": "jest -i test/e2e --forceExit", "test:e2e": "jest -i test/e2e --forceExit",
"test:fixtures": "jest test/fixtures --forceExit", "test:fixtures": "jest test/fixtures --forceExit",
"test:lint": "yarn lint && yarn ls-lint", "test:lint": "yarn lint && yarn ls-lint",