Skip to content

Commit

Permalink
initialize monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
repl6669 committed Nov 29, 2024
1 parent be3e6ba commit 9313d3e
Show file tree
Hide file tree
Showing 118 changed files with 7,270 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.json]
indent_style = space
indent_size = 2

[*.sh]
indent_style = tab
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml,js,ts,mts,vue,lua}]
indent_style = space
indent_size = 2

[docker-compose{,.*}.{yaml,yml}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false

[Dockerfile,Makefile]
indent_style = tab
indent_size = 4
12 changes: 12 additions & 0 deletions .env.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
APP_NAME=Laravel
APP_ENV=testing
APP_KEY=AckfSECXIvnK5r28GVIWUAxmbBSjTsmF
APP_DEBUG=true
APP_URL=http://localhost

DB_CONNECTION="sqlite"
DB_DATABASE=":memory:"

REDIS_HOST=localhost
REDIS_PASSWORD=null
REDIS_PORT=6379
30 changes: 30 additions & 0 deletions .env.testing.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
APP_NAME=Laravel
APP_ENV=testing
APP_KEY=AckfSECXIvnK5r28GVIWUAxmbBSjTsmF
APP_DEBUG=true
APP_URL=http://localhost

DB_CONNECTION="sqlite"
DB_DATABASE=":memory:"

REDIS_HOST=localhost
REDIS_PASSWORD=null
REDIS_PORT=6379

LUNAR_API_USE_HASHIDS=false

PAYMENT_DRIVER=stripe

STRIPE_PUBLIC_KEY=pk_test_
STRIPE_SECRET_KEY=sk_test_
STRIPE_WEBHOOK_SECRET=whsec_

#PayPal API Mode
PAYPAL_MODE=sandbox

#PayPal Setting & API Credentials - sandbox
PAYPAL_SANDBOX_CLIENT_ID=
PAYPAL_SANDBOX_CLIENT_SECRET=
PAYPAL_RETURN_URL="http://localhost:8000/paypal/return"
PAYPAL_CANCEL_URL="http://localhost:8000/paypal/cancel"
PAYPAL_WEBHOOK_ID=
1 change: 1 addition & 0 deletions .github/FUNDING.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [dystcz]
36 changes: 36 additions & 0 deletions .github/workflows/deploy-docs-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# name: Deploy docs preview to Pages
#
# on: [pull_request]
#
# concurrency: preview-${{ github.ref }}
#
# defaults:
# run:
# working-directory: ./docs
#
# jobs:
# # Deploy preview job
# deploy-preview:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Setup Node
# uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: npm
# cache-dependency-path: "./docs/package-lock.json"
# - name: Setup Pages
# uses: actions/configure-pages@v4
# - name: Install dependencies
# run: npm ci
# - name: Build with VitePress
# run: npm run docs:build --base=/lunar-api/docs/preview/${{ github.event.number }}
# - name: Deploy preview
# uses: rossjrw/pr-preview-action@v1
# with:
# source-dir: docs/.vitepress/dist
# umbrella-dir: docs/preview
58 changes: 58 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# name: Deploy docs to Pages
#
# on:
# push:
# branches: [v1]
# workflow_dispatch:
#
# permissions:
# contents: read
# pages: write
# id-token: write
#
# concurrency:
# group: pages
# cancel-in-progress: false
#
# defaults:
# run:
# working-directory: ./docs
#
# jobs:
# # Build job
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Setup Node
# uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: npm
# cache-dependency-path: "./docs/package-lock.json"
# - name: Setup Pages
# uses: actions/configure-pages@v4
# - name: Install dependencies
# run: npm ci
# - name: Build with VitePress
# run: npm run docs:build --base=/lunar-api/
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v3
# with:
# path: ./docs/.vitepress/dist
#
# # Deployment job
# deploy:
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# needs: build
# runs-on: ubuntu-latest
# name: Deploy
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
27 changes: 27 additions & 0 deletions .github/workflows/fix-php-code-style-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# name: Fix PHP code style issues
#
# on:
# push:
# paths:
# - "**.php"
#
# permissions:
# contents: write
#
# jobs:
# php-code-styling:
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# ref: ${{ github.head_ref }}
#
# - name: Fix PHP code style issues
# uses: aglipanci/[email protected]
#
# - name: Commit changes
# uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message: Fix styling
64 changes: 64 additions & 0 deletions .github/workflows/split-modules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Split Modules
on:
push:
branches:
- main
- "1.*"
tags:
- "*"
jobs:
tag_split_packages:
runs-on: ubuntu-latest
strategy:
matrix:
module: ["ares", "discord"]
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none

- name: Split ${{ matrix.module }}
uses: "danharrin/[email protected]"
if: "!startsWith(github.ref, 'refs/tags/')"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
package_directory: "modules/${{ matrix.module }}"
repository_organization: "dystcz"
repository_name: "dystore-${{ matrix.module }}"
user_name: "GitHub Action"
user_email: "[email protected]"
branch: ${GITHUB_REF#refs/heads/}

- name: Set env
if: "startsWith(github.ref, 'refs/tags/')"
run: echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Split ${{ matrix.module }}
uses: "danharrin/[email protected]"
if: "startsWith(github.ref, 'refs/tags/')"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
package_directory: "modules/${{ matrix.module }}"
repository_organization: "dystcz"
repository_name: "dystore-${{ matrix.module }}"
user_name: "GitHub Action"
user_email: "[email protected]"
branch: ${GITHUB_TAG%.*}

- name: Tag ${{ matrix.module }}
if: "startsWith(github.ref, 'refs/tags/')"
uses: "danharrin/[email protected]"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
tag: ${GITHUB_REF#refs/tags/}
package_directory: "modules/${{ matrix.module }}"
repository_organization: "dystcz"
repository_name: "dystore-${{ matrix.module }}"
user_name: "GitHub Action"
user_email: "[email protected]"
branch: ${GITHUB_TAG%.*}
64 changes: 64 additions & 0 deletions .github/workflows/split-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Split Packages
on:
push:
branches:
- main
- "1.*"
tags:
- "*"
jobs:
tag_split_packages:
runs-on: ubuntu-latest
strategy:
matrix:
package: ["api"]
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none

- name: Split ${{ matrix.package }}
uses: "danharrin/[email protected]"
if: "!startsWith(github.ref, 'refs/tags/')"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
package_directory: "packages/${{ matrix.package }}"
repository_organization: "dystcz"
repository_name: "dystore-${{ matrix.package }}"
user_name: "GitHub Action"
user_email: "[email protected]"
branch: ${GITHUB_REF#refs/heads/}

- name: Set env
if: "startsWith(github.ref, 'refs/tags/')"
run: echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Split ${{ matrix.package }}
uses: "danharrin/[email protected]"
if: "startsWith(github.ref, 'refs/tags/')"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
package_directory: "packages/${{ matrix.package }}"
repository_organization: "dystcz"
repository_name: "dystore-${{ matrix.package }}"
user_name: "GitHub Action"
user_email: "[email protected]"
branch: ${GITHUB_TAG%.*}

- name: Tag ${{ matrix.package }}
if: "startsWith(github.ref, 'refs/tags/')"
uses: "danharrin/[email protected]"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
tag: ${GITHUB_REF#refs/tags/}
package_directory: "packages/${{ matrix.package }}"
repository_organization: "dystcz"
repository_name: "dystore-${{ matrix.package }}"
user_name: "GitHub Action"
user_email: "[email protected]"
branch: ${GITHUB_TAG%.*}
39 changes: 39 additions & 0 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# name: "Static Analysis"
#
# on:
# pull_request:
#
# concurrency:
# group: sa-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches
# cancel-in-progress: true
#
# jobs:
# static-analysis:
# strategy:
# fail-fast: false
# matrix:
# php: [8.2, 8.3]
# laravel: [11]
#
# name: "PHP ${{ matrix.php }} - L${{ matrix.laravel }}"
# runs-on: "ubuntu-latest"
#
# steps:
# - name: "Checkout code"
# uses: actions/checkout@v4
#
# - name: "Setup PHP"
# uses: "shivammathur/setup-php@v2"
# with:
# php-version: "${{ matrix.php }}"
# extensions: "dom, curl, libxml, mbstring, zip, fileinfo"
# tools: "composer:v2"
# coverage: "none"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# - name: "Install dependencies from composer.json"
# run: "composer update --with='illuminate/support:${{ matrix.laravel }}' --no-interaction --no-progress"
#
# - name: "Run PHPStan"
# run: ./vendor/bin/phpstan
Loading

0 comments on commit 9313d3e

Please sign in to comment.