Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add the wordpress plugin check action #92

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/upload-release-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ jobs:
with:
composer-options: "--no-dev"

- name: Prepare the openedx-commerce directory for the release
run: |
make release

- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'openedx-commerce.zip'
exclusions: '*.git* .* /test/* /requirements/* /docs/* composer.lock *.yaml *.xml Makefile'
command: 'cd ./openedx-commerce'
filename: '../openedx-commerce.zip'

- name: Upload zip to latest release
uses: xresloader/upload-to-github-release@v1
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/wordpress-plugin-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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"

- name: Prepare the openedx-commerce directory for the release
run: |
make release

- name: Run plugin check
uses: wordpress/plugin-check-action@v1
with:
build-dir: './openedx-commerce'
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ requirements:
serve_docs: ## serve the built docs locally to preview the site in the browser
sphinx-autobuild docs/source $(BUILDDIR)/html

# Create the openedx-commerce directory with the needed files for the release.
release:
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/

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
Loading