mirror of
https://github.com/WordPress/create-block-theme.git
synced 2025-10-03 16:11:13 +08:00
GitHub Actions: Add JavaScript Unit Test (#508)
* GitHub Actions: Add JavaScript Unit Test * Update names
This commit is contained in:
parent
402d67fdab
commit
f67f9215c1
1 changed files with 24 additions and 1 deletions
25
.github/workflows/pr-checks.yml
vendored
25
.github/workflows/pr-checks.yml
vendored
|
@ -5,7 +5,8 @@ on:
|
|||
branches:
|
||||
- trunk
|
||||
jobs:
|
||||
Lint:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -41,3 +42,25 @@ jobs:
|
|||
- name: Run package.json Lint
|
||||
if: success() || failure()
|
||||
run: npm run lint:pkg-json
|
||||
|
||||
unit-test-js:
|
||||
name: JavaScript Unit Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: npm
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm i
|
||||
|
||||
- name: Compile JavaScript App
|
||||
run: npm run build
|
||||
|
||||
- name: Run JavaScript unit tests
|
||||
run: npm run test:unit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue