mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
chore(ci): cache build packages dist on ci jobs (#3335)
This commit is contained in:
parent
16e2a54528
commit
f1b84ac14a
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
@ -9,6 +9,33 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build:
|
||||||
|
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: Cache dist
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: packages/*/dist
|
||||||
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
@ -85,6 +112,8 @@ jobs:
|
|||||||
run: yarn test:fixtures:webpack
|
run: yarn test:fixtures:webpack
|
||||||
|
|
||||||
test-types:
|
test-types:
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@ -102,8 +131,11 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn --immutable
|
run: yarn --immutable
|
||||||
|
|
||||||
- name: Build
|
- name: Restore dist cache
|
||||||
run: yarn build
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: packages/*/dist
|
||||||
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
|
||||||
|
|
||||||
- name: Test (types)
|
- name: Test (types)
|
||||||
run: yarn test:types
|
run: yarn test:types
|
||||||
@ -111,6 +143,7 @@ jobs:
|
|||||||
build-release:
|
build-release:
|
||||||
needs:
|
needs:
|
||||||
- lint
|
- lint
|
||||||
|
- build
|
||||||
- test-fixtures
|
- test-fixtures
|
||||||
- test-fixtures-webpack
|
- test-fixtures-webpack
|
||||||
- test-types
|
- test-types
|
||||||
@ -131,8 +164,11 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn --immutable
|
run: yarn --immutable
|
||||||
|
|
||||||
- name: Build
|
- name: Restore dist cache
|
||||||
run: yarn build
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: packages/*/dist
|
||||||
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
|
||||||
|
|
||||||
- name: Release Edge
|
- name: Release Edge
|
||||||
if: |
|
if: |
|
||||||
|
Loading…
Reference in New Issue
Block a user