mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
update test coverage to include more Node and Windows tests (#4144)
* update node test coverage to include v18, more windows tests * chore(ci): update turbo to account for OS and NODE_VERSION * chore: disable node@18, add TODO Co-authored-by: Nate Moore <nate@astro.build>
This commit is contained in:
parent
ee38b02aa8
commit
778a4d2af1
3 changed files with 33 additions and 27 deletions
50
.github/workflows/ci.yml
vendored
50
.github/workflows/ci.yml
vendored
|
@ -24,6 +24,7 @@ env:
|
||||||
FORCE_COLOR: true
|
FORCE_COLOR: true
|
||||||
ASTRO_TELEMETRY_DISABLED: true
|
ASTRO_TELEMETRY_DISABLED: true
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint
|
||||||
|
@ -79,8 +80,8 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
OS: [ubuntu-latest]
|
||||||
node_version: [14]
|
NODE_VERSION: [14]
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -89,10 +90,10 @@ jobs:
|
||||||
- name: Setup PNPM
|
- name: Setup PNPM
|
||||||
uses: pnpm/action-setup@v2.2.1
|
uses: pnpm/action-setup@v2.2.1
|
||||||
|
|
||||||
- name: Setup node@${{ matrix.node_version }}
|
- name: Setup node@${{ matrix.NODE_VERSION }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.NODE_VERSION }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
@ -102,19 +103,20 @@ jobs:
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: 'Test: ${{ matrix.os }} (node@${{ matrix.node_version }})'
|
name: 'Test: ${{ matrix.os }} (node@${{ matrix.NODE_VERSION }})'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
OS: [ubuntu-latest, windows-latest]
|
||||||
node_version: [14, 16]
|
# TODO: Enable node@18!
|
||||||
|
NODE_VERSION: [14, 16]
|
||||||
include:
|
include:
|
||||||
- os: windows-latest
|
|
||||||
node_version: 14
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
node_version: 14
|
NODE_VERSION: 14
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
env:
|
||||||
|
NODE_VERSION: ${{ matrix.NODE_VERSION }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -122,10 +124,10 @@ jobs:
|
||||||
- name: Setup PNPM
|
- name: Setup PNPM
|
||||||
uses: pnpm/action-setup@v2.2.1
|
uses: pnpm/action-setup@v2.2.1
|
||||||
|
|
||||||
- name: Setup node@${{ matrix.node_version }}
|
- name: Setup node@${{ matrix.NODE_VERSION }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.NODE_VERSION }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Use Deno
|
- name: Use Deno
|
||||||
|
@ -143,15 +145,17 @@ jobs:
|
||||||
run: pnpm run test
|
run: pnpm run test
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
name: 'Test (E2E): ${{ matrix.os }} (node@${{ matrix.node_version }})'
|
name: 'Test (E2E): ${{ matrix.os }} (node@${{ matrix.NODE_VERSION }})'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest]
|
OS: [ubuntu-latest, windows-latest]
|
||||||
node_version: [14]
|
NODE_VERSION: [14]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
env:
|
||||||
|
NODE_VERSION: ${{ matrix.NODE_VERSION }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -159,10 +163,10 @@ jobs:
|
||||||
- name: Setup PNPM
|
- name: Setup PNPM
|
||||||
uses: pnpm/action-setup@v2.2.1
|
uses: pnpm/action-setup@v2.2.1
|
||||||
|
|
||||||
- name: Setup node@${{ matrix.node_version }}
|
- name: Setup node@${{ matrix.NODE_VERSION }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.NODE_VERSION }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
@ -175,13 +179,15 @@ jobs:
|
||||||
run: pnpm run test:e2e
|
run: pnpm run test:e2e
|
||||||
|
|
||||||
smoke:
|
smoke:
|
||||||
name: 'Test (Smoke): ${{ matrix.os }} (node@${{ matrix.node_version }})'
|
name: 'Test (Smoke): ${{ matrix.os }} (node@${{ matrix.NODE_VERSION }})'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
OS: [ubuntu-latest]
|
||||||
node_version: [14]
|
NODE_VERSION: [14]
|
||||||
|
env:
|
||||||
|
NODE_VERSION: ${{ matrix.NODE_VERSION }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -189,10 +195,10 @@ jobs:
|
||||||
- name: Setup PNPM
|
- name: Setup PNPM
|
||||||
uses: pnpm/action-setup@v2.2.1
|
uses: pnpm/action-setup@v2.2.1
|
||||||
|
|
||||||
- name: Setup node@${{ matrix.node_version }}
|
- name: Setup node@${{ matrix.NODE_VERSION }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.NODE_VERSION }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Checkout docs
|
- name: Checkout docs
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
"format:imports": "organize-imports-cli ./packages/*/tsconfig.json ./packages/*/*/tsconfig.json",
|
"format:imports": "organize-imports-cli ./packages/*/tsconfig.json ./packages/*/*/tsconfig.json",
|
||||||
"test": "turbo run test --output-logs=new-only --concurrency=1",
|
"test": "turbo run test --output-logs=new-only --concurrency=1",
|
||||||
"test:match": "cd packages/astro && pnpm run test:match",
|
"test:match": "cd packages/astro && pnpm run test:match",
|
||||||
"test:templates": "turbo run test --filter=create-astro --concurrency=1",
|
|
||||||
"test:smoke": "turbo run build --filter=\"@example/*\" --filter=\"astro.build\" --filter=\"docs\" --output-logs=new-only --concurrency=1",
|
"test:smoke": "turbo run build --filter=\"@example/*\" --filter=\"astro.build\" --filter=\"docs\" --output-logs=new-only --concurrency=1",
|
||||||
"test:vite-ci": "turbo run test --output-logs=new-only --no-deps --scope=astro --concurrency=1",
|
"test:vite-ci": "turbo run test --output-logs=new-only --no-deps --scope=astro --concurrency=1",
|
||||||
"test:e2e": "cd packages/astro && pnpm playwright install && pnpm run test:e2e",
|
"test:e2e": "cd packages/astro && pnpm playwright install && pnpm run test:e2e",
|
||||||
|
|
|
@ -14,10 +14,11 @@
|
||||||
"cache": false
|
"cache": false
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"outputs": []
|
"outputs": [],
|
||||||
},
|
"dependsOn": [
|
||||||
"test:templates": {
|
"$RUNNER_OS",
|
||||||
"outputs": []
|
"$NODE_VERSION"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"benchmark": {
|
"benchmark": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
|
|
Loading…
Reference in a new issue