Skip to content

Commit

Permalink
Merge pull request #263 from 10up/feat/node-github-actions
Browse files Browse the repository at this point in the history
feat: node github actions
  • Loading branch information
darylldoyle authored Dec 5, 2024
2 parents e23ba92 + fb8472c commit 95e706c
Show file tree
Hide file tree
Showing 5 changed files with 638 additions and 7 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Node

on:
push:
branches:
- main
pull_request:

jobs:
lint-js:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install dependencies
run: npm install

- name: Run Lint JS
run: npm run lint-js

lint-style:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install dependencies
run: npm install

- name: Run Lint Style
run: npm run lint-style

test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install dependencies
run: npm install

- name: Run Jest
run: npm run test

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install dependencies
run: npm install

- name: Build
run: npm run build
5 changes: 3 additions & 2 deletions mu-plugins/10up-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
"format-js": "10up-toolkit format-js",
"lint-js": "10up-toolkit lint-js",
"lint-style": "10up-toolkit lint-style",
"test": "10up-toolkit test-unit-jest",
"test": "10up-toolkit test-unit-jest --passWithNoTests",
"clean-dist": "rm -rf ./dist"
},
"engines": {
"node": ">=18.0.0"
},
"devDependencies": {
"10up-toolkit": "^6.3.0"
"10up-toolkit": "^6.3.0",
"jest-environment-jsdom": "^29.7.0"
},
"dependencies": {
"prop-types": "^15.7.2"
Expand Down
Loading

0 comments on commit 95e706c

Please sign in to comment.