mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-15 02:14:44 +00:00
d61a920e40
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
158 lines
4.2 KiB
YAML
158 lines
4.2 KiB
YAML
name: windows
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 2.x
|
|
pull_request:
|
|
branches:
|
|
- 2.x
|
|
- "!v[0-9]*"
|
|
|
|
# Remove default permissions of GITHUB_TOKEN for security
|
|
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
|
|
cancel-in-progress: ${{ github.event_name != 'push' }}
|
|
|
|
jobs:
|
|
setup:
|
|
runs-on: ${{ matrix.os }}
|
|
if: github.event_name == 'push' || !((github.base_ref == '2.x') && github.head_ref == 'dev')
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- run: corepack enable
|
|
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
|
with:
|
|
node-version: 18
|
|
cache: "yarn"
|
|
|
|
- name: install
|
|
run: yarn --check-files --frozen-lockfile --non-interactive
|
|
|
|
- name: cache workspace
|
|
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
|
with:
|
|
path: |
|
|
node_modules
|
|
packages/*/node_modules
|
|
distributions/*/node_modules
|
|
packages/*/dist
|
|
key: ${{ matrix.os }}-node-v18-nuxt-${{ github.sha }}
|
|
|
|
test-unit:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest]
|
|
|
|
env:
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- run: corepack enable
|
|
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
|
with:
|
|
node-version: 18
|
|
cache: "yarn"
|
|
|
|
- name: restore workspace cache
|
|
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
|
with:
|
|
path: |
|
|
node_modules
|
|
packages/*/node_modules
|
|
distributions/*/node_modules
|
|
packages/*/dist
|
|
key: ${{ matrix.os }}-node-v18-nuxt-${{ github.sha }}
|
|
|
|
- name: test unit
|
|
run: yarn test:unit --testPathIgnorePatterns=packages/cli
|
|
|
|
needs: setup
|
|
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest]
|
|
|
|
env:
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- run: corepack enable
|
|
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
|
with:
|
|
node-version: 18
|
|
cache: "yarn"
|
|
|
|
- name: restore workspace cache
|
|
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
|
with:
|
|
path: |
|
|
node_modules
|
|
packages/*/node_modules
|
|
distributions/*/node_modules
|
|
packages/*/dist
|
|
key: ${{ matrix.os }}-node-v18-nuxt-${{ github.sha }}
|
|
|
|
- name: build
|
|
run: yarn test:fixtures
|
|
|
|
- name: Save fixtures
|
|
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
|
with:
|
|
name: fixtures-${{ matrix.os }}-node-v18
|
|
path: test/fixtures
|
|
needs: setup
|
|
|
|
test-dev:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest]
|
|
|
|
env:
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- run: corepack enable
|
|
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
|
with:
|
|
node-version: 18
|
|
cache: "yarn"
|
|
|
|
- name: restore workspace cache
|
|
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
|
with:
|
|
path: |
|
|
node_modules
|
|
packages/*/node_modules
|
|
distributions/*/node_modules
|
|
packages/*/dist
|
|
key: ${{ matrix.os }}-node-v18-nuxt-${{ github.sha }}
|
|
|
|
- name: restore fixtures
|
|
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
|
|
with:
|
|
name: fixtures-${{ matrix.os }}-node-v18
|
|
path: test/fixtures
|
|
|
|
- name: test dev
|
|
run: yarn test:dev
|
|
needs: build
|