Skip to content

Commit

Permalink
a lot of experimental stuff plus try theme-json generator in js
Browse files Browse the repository at this point in the history
  • Loading branch information
overclokk committed Apr 1, 2024
1 parent fc40379 commit d20a04d
Show file tree
Hide file tree
Showing 73 changed files with 3,099 additions and 16,959 deletions.
23 changes: 23 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: 'standard-with-typescript',
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {},
};
66 changes: 32 additions & 34 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
name: Unit Test

on:
push:
branches: [ master, Dev ]
pull_request:
branches: [ master, Dev ]
push:
branches: [master, Dev]
pull_request:
branches: [master, Dev]

jobs:
unit_tests:

name: 🐘 Unit Test on PHP ${{ matrix.php_versions }}

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.php_versions == '8.1' }}

strategy:
matrix:
php_versions: [ '7.4' ]

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
coverage: xdebug2
# extensions: gd, zip
tools: composer:v2

- uses: ramsey/composer-install@v1
with:
composer-options: "--prefer-dist --ignore-platform-reqs"

- name: Run test suite
run: vendor/bin/codecept run unit --coverage-text

unit_tests:
name: 🐘 Unit Test on PHP ${{ matrix.php_versions }}

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.php_versions == '8.1' }}

strategy:
matrix:
php_versions: ['7.4']

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
coverage: xdebug2
# extensions: gd, zip
tools: composer:v2

- uses: ramsey/composer-install@v1
with:
composer-options: '--prefer-dist --ignore-platform-reqs'

- name: Run test suite
run: vendor/bin/codecept run unit --coverage-text
# - name: Run infection suite
# run: vendor/bin/infection --threads=4

Expand Down
112 changes: 55 additions & 57 deletions .github/workflows/zip.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,61 @@
name: Zip

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
branches: [master]
pull_request:
branches: [master]

workflow_dispatch:
workflow_dispatch:

jobs:
zip:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- uses: ramsey/composer-install@v1
with:
composer-options: "--no-dev -o"

- name: 👀 See the content
run: ls

- name: Use Node.js 12
uses: actions/setup-node@v2-beta
with:
node-version: '12'

- name: 🔨 Build Project
run: |
npm install
npm run build
- name: List output files
run: find dist/ -print

# - name: Archive Release
# uses: thedoctor0/zip-release@master
# with:
# type: 'zip'
# filename: 'ciao.zip'
# exclusions: '*.git* /*node_modules/* .editorconfig /test*/* .env .gitignore codeception.*'


# - uses: papeloto/action-zip@v1
# with:
# files: .
# recursive: true
# dest: ciao.zip

- uses: actions/upload-artifact@v2
with:
name: ciao
path: dist/**
retention-days: 5
zip:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- uses: ramsey/composer-install@v1
with:
composer-options: '--no-dev -o'

- name: 👀 See the content
run: ls

- name: Use Node.js 12
uses: actions/setup-node@v2-beta
with:
node-version: '12'

- name: 🔨 Build Project
run: |
npm install
npm run build
- name: List output files
run: find dist/ -print

# - name: Archive Release
# uses: thedoctor0/zip-release@master
# with:
# type: 'zip'
# filename: 'ciao.zip'
# exclusions: '*.git* /*node_modules/* .editorconfig /test*/* .env .gitignore codeception.*'

# - uses: papeloto/action-zip@v1
# with:
# files: .
# recursive: true
# dest: ciao.zip

- uses: actions/upload-artifact@v2
with:
name: ciao
path: dist/**
retention-days: 5
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
## Theme Json Generator
theme.schema.json

## Package Lock
package-lock.json

## Yarn
yarn.lock
yarn-error.log

# Directory
/vendor/
/_others/
Expand Down
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"bracketSpacing": false,
"printWidth": 120
}
Loading

0 comments on commit d20a04d

Please sign in to comment.