Skip to content

Commit

Permalink
Merge pull request #135 from wp-graphql/poc-3rd-party-plugin
Browse files Browse the repository at this point in the history
refactor: application store architecture
  • Loading branch information
josephfusco authored May 17, 2024
2 parents a7d710d + 4ecf114 commit 7c9660f
Show file tree
Hide file tree
Showing 67 changed files with 22,435 additions and 235 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-coins-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wpgraphql-ide": major
---

Refactored stores, including renaming 'wpgraphql-ide' to 'wpgraphql-ide/app', and adding additional stores such as 'wpgraphql-ide/editor-toolbar
8 changes: 3 additions & 5 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18']
node-version: ['20']
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -23,22 +23,20 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Build Assets
run: npm run build

- name: Install Playwright dependencies
run: |
npx playwright install chromium firefox webkit --with-deps
- name: Start WordPress Environment
run: npm run wp-env -- start

- name: Run E2E tests
run: npm run test:e2e

- name: Stop WordPress Environment
if: always()
run: npm run wp-env -- stop
55 changes: 55 additions & 0 deletions .github/workflows/prerelease-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Pre-Release

on:
push:
branches:
- beta

jobs:
pre-release:
name: Pre-Release
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm

- name: Install Dependencies
run: npm ci

- name: Enter Prerelease Mode
run: npx changeset pre enter beta

- name: Create Prerelease Version
run: npm run version

- name: Commit Changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: prerelease version bump"
- name: Push Changes
run: |
git push --follow-tags
- name: Build and Publish
run: npm run release

- name: Exit Prerelease Mode
run: npx changeset pre exit

- name: Upload Release Artifact
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "wpgraphql-ide.zip"
asset_name: wpgraphql-ide.zip
tag: ${{ format('v{0}', fromJSON(steps.changesets.outputs.publishedPackages)[0].version) }}
overwrite: true
1 change: 1 addition & 0 deletions .github/workflows/release-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm

- name: Install Dependencies
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "josephfusco/wpgraphql-ide",
"name": "wp-graphql/wpgraphql-ide",
"description": "A next-gen query editor for WPGraphQL.",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
Expand Down
67 changes: 67 additions & 0 deletions plugins/third-party-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Hidden files on Windows machines
.DS_Store

# Hidden files for users using JetBrains IDEs (PHPStorm, WebStorm, etc)
.idea

# Hidden files for users using VSCode as their IDE.
.vscode

# Composer dependencies. These should be installed on the users machine
vendor

# We _do_ want to version our tests!
!/tests

# PHPCS cached files.
/tests/_output/*.json

# Directory used to generate the .zip for deploying to WordPress.org
plugin-build

# Output of testing code coverage
coverage/*

# Generated Schema used in some tooling. Versioned Schema is uploaded as a Release artifact to Github.
schema.graphql

# Used to override phpcs.xml.dist
phpcs.xml

# Config for phpunit. Used to override phpunit.xml.dist
phpunit.xml

# Files output by Docker
docker-output

# JavaScript dependencies. Should be installed locally on the machine, not versioned
node_modules

# Config for Codeception. Used to override the codeception.dist.yml
codeception.yml

# Used to send code coverage to Coveralls
php-coveralls.phar

# Log files
.log

# File used for Codeception to track test coverage
c3.php

# Used for setting local environment variables when testing
.env
.env.testing

# output from e2e tests
artifacts

# build/release artifacts
build/
third-party-plugin/
third-party-plugin.php
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/@wpgraphql/
Loading

0 comments on commit 7c9660f

Please sign in to comment.