mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
chore(actions): speed up windows build (#8265)
This commit is contained in:
parent
1f9f324963
commit
418405c216
57
.github/workflows/windows.yml
vendored
57
.github/workflows/windows.yml
vendored
@ -48,41 +48,38 @@ jobs:
|
||||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
|
||||
|
||||
|
||||
# TODO: Investigate [error]Process completed with exit code 1.
|
||||
# test-unit:
|
||||
# runs-on: ${{ matrix.os }}
|
||||
test-unit:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
# strategy:
|
||||
# matrix:
|
||||
# os: [windows-latest]
|
||||
# node: [12]
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
node: [12]
|
||||
|
||||
# env:
|
||||
# NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
|
||||
# steps:
|
||||
# - uses: actions/setup-node@v1
|
||||
# with:
|
||||
# node-version: ${{ matrix.node }}
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
# - name: checkout
|
||||
# uses: actions/checkout@master
|
||||
- name: checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
# - name: restore workspace cache
|
||||
# uses: actions/cache@v1
|
||||
# with:
|
||||
# path: ./**/node_modules
|
||||
# key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
|
||||
- name: restore workspace cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
packages/*/node_modules
|
||||
packages/*/dist
|
||||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
|
||||
|
||||
# - name: test unit
|
||||
# run: node node_modules/jest/bin/jest packages -i --coverage --verbose
|
||||
- name: test unit
|
||||
run: yarn test:unit --testPathIgnorePatterns=packages/cli
|
||||
|
||||
# - name: codecov
|
||||
# uses: codecov/codecov-action@v1
|
||||
# with:
|
||||
# token: ${{ secrets.CODECOV_TOKEN }}
|
||||
# flags: unittests
|
||||
# needs: setup
|
||||
needs: setup
|
||||
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
@ -113,7 +110,7 @@ jobs:
|
||||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
|
||||
|
||||
- name: build
|
||||
run: yarn test:fixtures -i
|
||||
run: yarn test:fixtures
|
||||
|
||||
- name: cache fixtures
|
||||
uses: actions/cache@v2
|
||||
@ -157,5 +154,5 @@ jobs:
|
||||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-fixtures-${{ github.sha }}
|
||||
|
||||
- name: test dev
|
||||
run: yarn test:dev -i
|
||||
run: yarn test:dev
|
||||
needs: build
|
||||
|
@ -3,12 +3,16 @@ import { common, server } from '../../src/options'
|
||||
import * as utils from '../../src/utils/'
|
||||
import * as config from '../../src/utils/config'
|
||||
import * as constants from '../../src/utils/constants'
|
||||
import { consola } from '../utils'
|
||||
import { consola, localPath } from '../utils'
|
||||
|
||||
jest.mock('@nuxt/core')
|
||||
jest.mock('@nuxt/builder')
|
||||
jest.mock('@nuxt/generator')
|
||||
|
||||
jest.mock(localPath('@nuxt/core'))
|
||||
jest.mock(localPath('@nuxt/builder'))
|
||||
jest.mock(localPath('@nuxt/generator'))
|
||||
|
||||
const allOptions = {
|
||||
...common,
|
||||
...server
|
||||
|
@ -1,9 +1,14 @@
|
||||
import path from 'path'
|
||||
import consola from 'consola'
|
||||
|
||||
export * from './mocking'
|
||||
export { NuxtCommand } from '../../src'
|
||||
|
||||
consola.mockTypes(() => jest.fn())
|
||||
|
||||
const localPath = modulePath => path.resolve(process.cwd(), 'node_modules', modulePath)
|
||||
|
||||
export {
|
||||
consola
|
||||
consola,
|
||||
localPath
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user