Coder Social home page Coder Social logo

theme-review-action's Introduction

WordPress Theme Check Action

This code action runs various test suites to help WordPress theme development.

Requirements

  • NodeJs
  • NPM
  • Docker

Triggers

  1. NPX
  2. GitHub Actions
  3. Locally

Running via NPX

Inside of your WordPress theme folder, run npx wordpress-theme-check-action.

Output Location: Console

Windows is currently not supported.

Running via GitHub Actions

You can run this project on GitHub. Here is an example GitHub action workflow file:

name: Test My Theme

on:
  push:
    branches: [ main ] ## Change the branch name to match yours
  pull_request:
    branches: [ main ] ## Change the branch name to match yours


jobs:
  run_tests:
    runs-on: ubuntu-latest

    steps:

    ## We need to keep this around until Gutenberg 9.6 is launched.
    - uses: actions/setup-node@v1
      with:
        node-version: '12'

    - name: Theme Test
      id: test
      uses: Wordpress/theme-review-action@trunk
      with:
        accessible-ready: true
        ui-debug: true

    - uses: actions/upload-artifact@v2
      if: ${{ always() }}
      with:
        name: Screenshots

Github Action Inputs

Input Type Description
root-folder string Location of your theme's root folder
accessible-ready boolean Whether we should run the additional accessibility tests
ui-debug boolean Setting this to true will save some screenshot artifacts for debugging

Output Location: GitHub Annotations

Locally

  1. Run git clone [email protected]:WordPress/theme-review-action.git && cd theme-review-action.
  2. Run npm install to install dependencies.
  3. Run npm run start.

The tests run on files within the /test-theme folder.

You can pass a relative path to your theme like so: npm run start --pathToTheme=../my-theme.

To see all the options run npm run start -- --help.

Output Location: /logs folder. Files are replaced on each test run.

theme-review-action's People

Contributors

stevendufresne avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.