-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH actions refactored into single CI workflow (#945)
- Loading branch information
Showing
8 changed files
with
127 additions
and
171 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,29 @@ | ||
name: Setup | ||
description: Setup build | ||
|
||
inputs: | ||
node-version: | ||
required: true | ||
default: "16.15.0" | ||
description: Node version | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Use Node.js ${{ inputs.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
shell: bash | ||
run: npm ci |
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,61 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: ~ | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
- run: npm run lint | ||
|
||
unit-test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.20.0, 16.15.0] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm run build | ||
- run: npm run test | ||
|
||
e2e-test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.20.0, 16.15.0] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm run build | ||
- run: npm run e2e | ||
|
||
lighthouse-report: | ||
needs: [lint, unit-test, e2e-test] | ||
uses: ./.github/workflows/lighthouse-report.yml | ||
secrets: inherit | ||
|
||
size-report: | ||
needs: [lint, unit-test, e2e-test] | ||
uses: ./.github/workflows/size-report.yml | ||
secrets: inherit |
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
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,20 @@ | ||
name: Size report | ||
|
||
on: | ||
workflow_call: ~ | ||
workflow_dispatch: ~ | ||
|
||
jobs: | ||
size-report: | ||
runs-on: ubuntu-latest | ||
env: | ||
CI_JOB_NUMBER: 1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
|
||
- uses: andresz1/size-limit-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
build_script: build:client | ||
skip_step: install |