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

chore: Prepare for wp.org submission #176

Merged
merged 21 commits into from
Jun 25, 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
5 changes: 5 additions & 0 deletions .changeset/soft-spies-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wpgraphql-ide": patch
---

- **New Capability**: Introduced a new custom capability `manage_graphql_ide`. This capability allows administrators to control access to the WPGraphQL IDE functionalities. The capability has been assigned to the `administrator` role by default.
46 changes: 46 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Code Quality

on:
push:
branches:
- main
pull_request:
branches:
- main

# Cancel previous workflow run groups that have not completed.
concurrency:
# Group workflow runs by workflow name, along with the head branch ref of the pull request
# or otherwise the branch or tag ref.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
run:
runs-on: ubuntu-latest
name: Check code

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none

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

- name: Run PHPStan
# If STEP_DEBUG is enabled, PHPStan will run in debug mode.
run: |
if [ "${{ secrets.ACTIONS_STEP_DEBUG }}" = "true" ]; then
php vendor/bin/phpstan analyse --memory-limit=2G --debug
else
composer run-script phpstan
fi
19 changes: 19 additions & 0 deletions .github/workflows/deploy-to-wordpress.org.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy to WordPress.org
on:
push:
tags:
- "*"

jobs:
tag:
name: New tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: WordPress Plugin Deploy
uses: 10up/[email protected]
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: wpgraphql-ide

57 changes: 33 additions & 24 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
name: E2E Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
pull_request:
branches:
- main

jobs:
e2e-tests:
name: E2E tests on Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20']
steps:
- name: Checkout code
uses: actions/checkout@v4
e2e-tests:
name: E2E tests on Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20']
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci
- name: Cache Playwright Browsers
uses: actions/cache@v3
with:
path: |
~/.cache/ms-playwright/
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-playwright-

- name: Start WordPress & Run E2E tests
run: npm run test:e2e
- name: Install dependencies
run: npm ci

- name: Start WordPress & Run E2E tests
run: npm run test:e2e
Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading