mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 18:13:54 +00:00
e19d8467e1
Co-authored-by: Renovate Bot <bot@renovateapp.com>
183 lines
3.7 KiB
YAML
183 lines
3.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [16]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Build
|
|
run: yarn build
|
|
|
|
- name: Cache dist
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: packages/*/dist
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
|
|
|
|
lint:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [16]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Lint
|
|
run: yarn lint
|
|
|
|
test-fixtures:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
node: [16]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Stub
|
|
run: yarn stub
|
|
|
|
- name: Test (unit)
|
|
run: yarn test:unit
|
|
|
|
- name: Test (fixtures)
|
|
run: yarn test:fixtures
|
|
|
|
test-fixtures-webpack:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
node: [16]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Stub
|
|
run: yarn stub
|
|
|
|
- name: Test (fixtures)
|
|
run: yarn test:fixtures:webpack
|
|
|
|
test-types:
|
|
needs:
|
|
- build
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [16]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Restore dist cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: packages/*/dist
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
|
|
|
|
- name: Test (types)
|
|
run: yarn test:types
|
|
|
|
build-release:
|
|
if: |
|
|
github.event_name == 'push' &&
|
|
!contains(github.event.head_commit.message, '[skip-release]') &&
|
|
!contains(github.event.head_commit.message, 'chore') &&
|
|
!contains(github.event.head_commit.message, 'docs')
|
|
needs:
|
|
- lint
|
|
- build
|
|
- test-fixtures
|
|
- test-fixtures-webpack
|
|
- test-types
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [16]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Restore dist cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: packages/*/dist
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
|
|
|
|
- name: Release Edge
|
|
run: ./scripts/release-edge.sh
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
|