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

feat: implement redux #47

Merged
merged 14 commits into from
Feb 28, 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
78 changes: 39 additions & 39 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
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: ['18']
steps:
- name: Checkout code
uses: actions/checkout@v4

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

- 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
run: npm run wp-env -- stop
e2e-tests:
name: E2E tests on Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18']
steps:
- name: Checkout code
uses: actions/checkout@v4

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

- 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
run: npm run wp-env -- stop
88 changes: 44 additions & 44 deletions .github/workflows/release-plugin.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
name: Release Plugin

on:
push:
tags:
- 'v*'
push:
tags:
- 'v*'

jobs:
build-and-release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout Repository
uses: actions/checkout@v4

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

- name: Install Dependencies using npm ci
run: npm ci

- name: Run Lint and Tests
run: |
npm run lint:js
npm run test

- name: Build Package
run: npm run build

- name: Zip Artifacts
run: |
mkdir -p wpgraphql-ide/
rsync -av --exclude-from='.distignore' --delete-excluded ./ wpgraphql-ide/ && zip -r wpgraphql-ide.zip wpgraphql-ide/ && rm -rf wpgraphql-ide/
ls -la

- name: Upload release artifact
uses: softprops/action-gh-release@v1
with:
files: wpgraphql-ide.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
build-and-release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout Repository
uses: actions/checkout@v4

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

- name: Install Dependencies using npm ci
run: npm ci

- name: Run Lint and Tests
run: |
npm run lint:js
npm run test

- name: Build Package
run: npm run build

- name: Zip Artifacts
run: |
mkdir -p wpgraphql-ide/
rsync -av --exclude-from='.distignore' --delete-excluded ./ wpgraphql-ide/ && zip -r wpgraphql-ide.zip wpgraphql-ide/ && rm -rf wpgraphql-ide/
ls -la

- name: Upload release artifact
uses: softprops/action-gh-release@v1
with:
files: wpgraphql-ide.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: write
46 changes: 23 additions & 23 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Unit Tests

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

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

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

- name: Install dependencies
run: npm ci
- name: Install dependencies
run: npm ci

- name: Run Unit tests
run: npm run test:unit
- name: Run Unit tests
run: npm run test:unit
19 changes: 8 additions & 11 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"core": "WordPress/WordPress",
"plugins": [
".",
"https://downloads.wordpress.org/plugin/wp-graphql.zip"
],
"themes": [],
"port": 8888,
"config": {
"WP_DEBUG": true
}
}
"core": "WordPress/WordPress",
"plugins": [ ".", "https://downloads.wordpress.org/plugin/wp-graphql.zip" ],
"themes": [],
"port": 8888,
"config": {
"WP_DEBUG": true
}
}
Loading
Loading