Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: split ci jobs for faster docs & template updates #11294

Merged
merged 3 commits into from
Dec 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI Lint

env:
# 7 GiB by default on GitHub, setting to 6 GiB
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
NODE_OPTIONS: --max-old-space-size=6144

on:
push:
branches:
- main
- release/*
- feat/*
- fix/*
- perf/*
- v1
- v2
- v2.*
- v3.*
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
lint:
timeout-minutes: 10
runs-on: ubuntu-latest
name: "Lint, Format, Typecheck, Docs"
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4

- name: Set node version to 16
uses: actions/setup-node@v3
with:
node-version: 16
ArnaudBarre marked this conversation as resolved.
Show resolved Hide resolved
cache: "pnpm"

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build

- name: Lint
run: pnpm run lint

- name: Check formatting
run: pnpm prettier --check .

- name: Typecheck
run: pnpm run typecheck

- name: Test docs
run: pnpm run test-docs
40 changes: 3 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ on:
- v2.*
- v3.*
pull_request:
paths-ignore:
- "docs/**"
- "packages/create-vite/**"
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -98,40 +101,3 @@ jobs:

- name: Test build
run: pnpm run test-build

- name: Test docs
run: pnpm run test-docs

lint:
if: github.repository == 'vitejs/vite'
timeout-minutes: 10
runs-on: ubuntu-latest
name: "Lint: node-16, ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4

- name: Set node version to 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build

- name: Lint
run: pnpm run lint

- name: Check formatting
run: pnpm prettier --check .

- name: Typecheck
run: pnpm run typecheck