Setup github actions (#7321)

This commit is contained in:
fisker Cheung authored and Lipis committed 2020-01-25 16:22:29 +02:00
1 parent 638a01ecd1
commit 93f71d499a
4 files changed
+147

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
name: Dev_Test
on: [pull_request]
jobs:
dev_test:
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
node:
- "13"
- "12"
- "10"
name: Dev test on node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
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: Run Test
run: yarn test
+40
View File
@@ -0,0 +1,40 @@
name: Lint
on: [pull_request]
jobs:
lint:
name: Lint
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: Check dependencies
run: yarn check-deps
- name: Check JSDoc types
run: yarn check-types
- name: Lint code
run: yarn lint
- name: Lint docs
run: yarn lint-docs
- name: Spellcheck
run: yarn spellcheck
- name: Check file changes
run: yarn && echo "Listing changed files:" && git diff --name-only --exit-code && echo "No files changed during lint."
+69
View File
@@ -0,0 +1,69 @@
name: Prod_Test
on: [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
prod_test:
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
node:
- "13"
- "12"
- "10"
name: Prod test on node ${{ matrix.node }} and ${{ 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 Test
run: yarn test:dist