mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [14]
|
|
|
|
steps:
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: checkout
|
|
uses: actions/checkout@master
|
|
|
|
- uses: actions/cache@v2
|
|
id: yarn-cache
|
|
with:
|
|
path: .yarn
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install dependencies
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: yarn --immutable
|
|
|
|
- name: Lint
|
|
run: yarn lint
|
|
|
|
- name: Build
|
|
run: yarn build
|
|
|
|
- name: Test
|
|
run: yarn test:presets
|
|
|
|
- name: Release Edge
|
|
if: github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip-release]')
|
|
run: ./scripts/release-edge.sh
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
|