mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
124 lines
2.5 KiB
YAML
124 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [14]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Lint
|
|
run: yarn lint
|
|
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
node: [14]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
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 (presets)
|
|
run: yarn test:presets
|
|
|
|
test-bridge:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
node: [14]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
cache-dependency-path: |
|
|
yarn.lock
|
|
test/fixtures/bridge/yarn.lock
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Install dependencies (bridge fixture)
|
|
run: yarn --immutable && cd test/fixtures/bridge && yarn --immutable
|
|
|
|
- name: Stub
|
|
run: yarn stub
|
|
|
|
- name: Test (presets bridge)
|
|
run: yarn test:bridge
|
|
|
|
build-release:
|
|
needs:
|
|
- test
|
|
- test-bridge
|
|
- lint
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [14]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Build
|
|
run: yarn build
|
|
|
|
- name: Release Edge
|
|
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')
|
|
run: ./scripts/release-edge.sh
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
|