Skip to content

Commit

Permalink
Add Plugin Check action
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-mendonca committed Mar 22, 2024
1 parent 0bbbc02 commit b883c1f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/plugin-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: WP Plugin Check
on: # Rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- dev
- 'releases/*'
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:

jobs:
# Runs the WP Plugin Check.
#
# Checks from the Plugin Review Team.
#
# For the detailed list of checks:
# - https://wordpress.org/plugins/plugin-check/
#
# Performs the following steps:
# - Checks out the repository.
# - Sets up PHP.
# - Installs Composer dependencies.
# - Runs the Plugin Check.
plugin-check:
name: Plugin Check
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@2.30.0
with:
php-version: '7.4'
coverage: none
env:
fail-fast: false

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
composer-options: "--no-dev"

- name: Copy the plugin files to the plugin check folder, excluding the files on .distignore.
run: rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" gp-format-csv/ --delete --delete-excluded

- name: Run plugin check
uses: swissspidy/wp-plugin-check-action@main
with:
build-dir: 'gp-format-csv'
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Adds the CSV format to GlotPress to export/import translations and originals.

[![Coding Standards](https://github.com/pedro-mendonca/GP-Format-CSV/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/pedro-mendonca/GP-Format-CSV/actions/workflows/coding-standards.yml)
[![Static Analysis](https://github.com/pedro-mendonca/GP-Format-CSV/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/pedro-mendonca/GP-Format-CSV/actions/workflows/static-analysis.yml)
[![WP Plugin Check](https://github.com/pedro-mendonca/GP-Format-CSV/actions/workflows/plugin-check.yml/badge.svg)](https://github.com/pedro-mendonca/GP-Format-CSV/actions/workflows/plugin-check.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/48804e8b44f445afbed607c43ec3e9dd)](https://www.codacy.com/gh/pedro-mendonca/GP-Format-CSV/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pedro-mendonca/GP-Format-CSV&utm_campaign=Badge_Grade)

## Description
Expand Down

0 comments on commit b883c1f

Please sign in to comment.