-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: split Github Actions workflows
- Loading branch information
Showing
21 changed files
with
304 additions
and
108 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@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
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@v3 | ||
if: failure() | ||
with: | ||
name: npm-logs | ||
path: ~/.npm/_logs |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test Coverage | ||
on: [workflow_dispatch, workflow_call] | ||
jobs: | ||
coverage: | ||
name: Test Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Test | ||
run: npm run test:coverage | ||
- name: Coverage | ||
uses: coverallsapp/github-action@v1.1.2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Archive npm failure logs | ||
uses: actions/upload-artifact@v3 | ||
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
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@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
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@v3 | ||
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@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
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@v3 | ||
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@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
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@v3 | ||
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.