-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
274 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build | ||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
bundles: | ||
required: false | ||
type: string | ||
env: | ||
BUNDLES: ${{ inputs.bundles }} | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist-${{ inputs.os }} | ||
path: dist | ||
- name: Archive npm failure logs | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: npm-logs | ||
path: ~/.npm/_logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: CI Build | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'test' | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
test: | ||
needs: build | ||
uses: ./.github/workflows/test.yml | ||
coverage: | ||
uses: ./.github/workflows/coverage.yml | ||
performance: | ||
needs: build | ||
uses: ./.github/workflows/performance.yml | ||
with: | ||
os: ubuntu-latest | ||
docs: | ||
uses: ./.github/workflows/docs.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Lint | ||
on: [workflow_dispatch, workflow_call] | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Archive npm failure logs | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: npm-logs | ||
path: ~/.npm/_logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Performance Check | ||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
jobs: | ||
performance: | ||
name: Performance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist-${{ inputs.os }} | ||
path: dist | ||
- name: Check Performance | ||
run: npm run perf:diff | ||
- name: Archive npm failure logs | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: npm-logs | ||
path: ~/.npm/_logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: PR Build | ||
on: pull_request | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
test: | ||
needs: build | ||
uses: ./.github/workflows/test.yml | ||
coverage: | ||
uses: ./.github/workflows/coverage.yml | ||
performance: | ||
needs: build | ||
uses: ./.github/workflows/performance.yml | ||
with: | ||
os: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Test | ||
on: [workflow_dispatch, workflow_call] | ||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
timezone: [Etc/GMT, Asia/Shanghai, America/New_York] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist-${{ matrix.os }} | ||
path: dist | ||
- name: Run Test | ||
run: TZ=${{ matrix.timezone }} npm test | ||
- name: Archive npm failure logs | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: npm-logs | ||
path: ~/.npm/_logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.