From 7de2a84031e1ce19ab7ea4ddceafb3de7923f58d Mon Sep 17 00:00:00 2001 From: Maria Fernanda Magallanes Zubillaga Date: Tue, 3 Sep 2024 15:19:42 -0500 Subject: [PATCH] test: add the wordpress plugin check action --- .github/workflows/wordpress-plugin-check.yml | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/wordpress-plugin-check.yml diff --git a/.github/workflows/wordpress-plugin-check.yml b/.github/workflows/wordpress-plugin-check.yml new file mode 100644 index 0000000..767340a --- /dev/null +++ b/.github/workflows/wordpress-plugin-check.yml @@ -0,0 +1,27 @@ +name: 'WordPress Plugin Check' +on: + pull_request + +jobs: + check: + name: Plugin Check + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Composer dependencies + uses: ramsey/composer-install@v3 + with: + composer-options: "--no-dev" + + # Prepare the plugin as we prepare it in the ZIP creation + - name: Create openedx-commerce directory and copy files + run: | + mkdir openedx-commerce + rsync -av --exclude='*.git*' --exclude='.*' --exclude='/test/*' --exclude='/requirements/*' --exclude='/docs/*' --exclude='composer.lock' --exclude='*.yaml' --exclude='*.xml' --exclude='Makefile' ./ openedx-commerce/ + + - name: Run plugin check + uses: wordpress/plugin-check-action@v1 + with: + build-dir: './openedx-commerce'