2020-08-26 11:17:29 +00:00
|
|
|
name: windows
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 2.x
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 2.x
|
2023-06-09 19:35:09 +00:00
|
|
|
- "!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' }}
|
2020-08-26 11:17:29 +00:00
|
|
|
|
|
|
|
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]
|
2023-05-03 09:19:58 +00:00
|
|
|
node: [16]
|
2020-08-26 11:17:29 +00:00
|
|
|
|
|
|
|
steps:
|
2023-09-05 10:33:01 +00:00
|
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
|
2023-06-05 18:24:32 +00:00
|
|
|
- run: corepack enable
|
2023-08-18 14:27:49 +00:00
|
|
|
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
|
2020-08-26 11:17:29 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
2023-06-05 18:24:32 +00:00
|
|
|
cache: "yarn"
|
2020-08-26 11:17:29 +00:00
|
|
|
|
|
|
|
- name: install
|
|
|
|
run: yarn --check-files --frozen-lockfile --non-interactive
|
|
|
|
|
|
|
|
- name: cache workspace
|
2023-06-05 18:24:32 +00:00
|
|
|
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
2020-08-26 11:17:29 +00:00
|
|
|
with:
|
2020-10-29 22:31:28 +00:00
|
|
|
path: |
|
|
|
|
node_modules
|
|
|
|
packages/*/node_modules
|
2020-11-04 14:14:46 +00:00
|
|
|
distributions/*/node_modules
|
2020-10-29 22:31:28 +00:00
|
|
|
packages/*/dist
|
2020-08-26 11:17:29 +00:00
|
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
|
|
|
|
|
2020-11-04 13:38:38 +00:00
|
|
|
test-unit:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest]
|
2023-05-03 09:19:58 +00:00
|
|
|
node: [16]
|
2020-11-04 13:38:38 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
|
|
|
|
|
|
steps:
|
2023-09-05 10:33:01 +00:00
|
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
|
2023-06-05 18:24:32 +00:00
|
|
|
- run: corepack enable
|
2023-08-18 14:27:49 +00:00
|
|
|
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
|
2020-11-04 13:38:38 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
2023-06-05 18:24:32 +00:00
|
|
|
cache: "yarn"
|
2020-11-04 13:38:38 +00:00
|
|
|
|
|
|
|
- name: restore workspace cache
|
2023-06-05 18:24:32 +00:00
|
|
|
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
2020-11-04 13:38:38 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
node_modules
|
|
|
|
packages/*/node_modules
|
2020-11-04 14:14:46 +00:00
|
|
|
distributions/*/node_modules
|
2020-11-04 13:38:38 +00:00
|
|
|
packages/*/dist
|
|
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
|
|
|
|
|
|
|
|
- name: test unit
|
|
|
|
run: yarn test:unit --testPathIgnorePatterns=packages/cli
|
|
|
|
|
|
|
|
needs: setup
|
2020-08-26 11:17:29 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest]
|
2023-05-03 09:19:58 +00:00
|
|
|
node: [16]
|
2020-08-26 11:17:29 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
|
|
|
|
|
|
steps:
|
2023-09-05 10:33:01 +00:00
|
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
|
2023-06-05 18:24:32 +00:00
|
|
|
- run: corepack enable
|
2023-08-18 14:27:49 +00:00
|
|
|
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
|
2020-08-26 11:17:29 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
2023-06-05 18:24:32 +00:00
|
|
|
cache: "yarn"
|
2020-08-26 11:17:29 +00:00
|
|
|
|
|
|
|
- name: restore workspace cache
|
2023-06-05 18:24:32 +00:00
|
|
|
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
2020-08-26 11:17:29 +00:00
|
|
|
with:
|
2020-10-29 22:31:28 +00:00
|
|
|
path: |
|
|
|
|
node_modules
|
|
|
|
packages/*/node_modules
|
2020-11-04 14:14:46 +00:00
|
|
|
distributions/*/node_modules
|
2020-10-29 22:31:28 +00:00
|
|
|
packages/*/dist
|
2020-08-26 11:17:29 +00:00
|
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
|
|
|
|
|
|
|
|
- name: build
|
2020-11-04 13:38:38 +00:00
|
|
|
run: yarn test:fixtures
|
2020-08-26 11:17:29 +00:00
|
|
|
|
2021-02-07 22:25:51 +00:00
|
|
|
- name: Save fixtures
|
2023-06-05 18:24:32 +00:00
|
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
2020-08-26 11:17:29 +00:00
|
|
|
with:
|
2021-02-07 22:25:51 +00:00
|
|
|
name: fixtures-${{ matrix.os }}-node-v${{ matrix.node }}
|
2020-08-26 11:17:29 +00:00
|
|
|
path: test/fixtures
|
|
|
|
needs: setup
|
|
|
|
|
|
|
|
test-dev:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest]
|
2023-05-03 09:19:58 +00:00
|
|
|
node: [16]
|
2020-08-26 11:17:29 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
|
|
|
|
|
|
steps:
|
2023-09-05 10:33:01 +00:00
|
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
|
2023-06-05 18:24:32 +00:00
|
|
|
- run: corepack enable
|
2023-08-18 14:27:49 +00:00
|
|
|
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
|
2020-08-26 11:17:29 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
2023-06-05 18:24:32 +00:00
|
|
|
cache: "yarn"
|
2020-08-26 11:17:29 +00:00
|
|
|
|
|
|
|
- name: restore workspace cache
|
2023-06-05 18:24:32 +00:00
|
|
|
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
2020-08-26 11:17:29 +00:00
|
|
|
with:
|
2020-10-29 22:31:28 +00:00
|
|
|
path: |
|
|
|
|
node_modules
|
|
|
|
packages/*/node_modules
|
2020-11-04 14:14:46 +00:00
|
|
|
distributions/*/node_modules
|
2020-10-29 22:31:28 +00:00
|
|
|
packages/*/dist
|
2020-08-26 11:17:29 +00:00
|
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
|
|
|
|
|
|
|
|
- name: restore fixtures
|
2023-06-05 18:24:32 +00:00
|
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
2020-08-26 11:17:29 +00:00
|
|
|
with:
|
2021-02-07 22:25:51 +00:00
|
|
|
name: fixtures-${{ matrix.os }}-node-v${{ matrix.node }}
|
2020-08-26 11:17:29 +00:00
|
|
|
path: test/fixtures
|
|
|
|
|
|
|
|
- name: test dev
|
2020-11-04 13:38:38 +00:00
|
|
|
run: yarn test:dev
|
2020-08-26 11:17:29 +00:00
|
|
|
needs: build
|