147 lines
2.9 KiB
YAML
147 lines
2.9 KiB
YAML
name: Prod
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- patch-release
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: "12"
|
|
|
|
- name: Install Dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Build Package
|
|
run: yarn build
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: dist
|
|
path: dist
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: "12"
|
|
|
|
- name: Install Dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Download Artifact
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: dist
|
|
path: dist
|
|
|
|
- name: Lint Code
|
|
run: yarn lint:dist
|
|
|
|
test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- "ubuntu-latest"
|
|
- "macos-latest"
|
|
- "windows-latest"
|
|
node:
|
|
- "13"
|
|
- "12"
|
|
- "10"
|
|
exclude:
|
|
- os: "macos-latest"
|
|
node: "13"
|
|
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
needs: [build]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Install Dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Download Artifact
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: dist
|
|
path: dist
|
|
|
|
- name: Run Tests
|
|
run: yarn test:dist
|
|
|
|
standalone:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- "ubuntu-latest"
|
|
- "macos-latest"
|
|
- "windows-latest"
|
|
node:
|
|
- "13"
|
|
- "12"
|
|
- "10"
|
|
exclude:
|
|
- os: "macos-latest"
|
|
node: "13"
|
|
env:
|
|
STANDALONE: true
|
|
name: Node.js ${{ matrix.node }} on ${{ matrix.os }} (standalone)
|
|
runs-on: ${{ matrix.os }}
|
|
needs: [build]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Install Dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Download Artifact
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: dist
|
|
path: dist
|
|
|
|
- name: Run Tests
|
|
run: yarn test:dist
|