Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz authored Apr 23, 2024
0 parents commit 443592f
Show file tree
Hide file tree
Showing 7 changed files with 777 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Backend build

on:
push:
branches:
- main
- '[0-9]+.[0-9]+'
pull_request: ~

jobs:
cs-fix:
name: Run code style check
runs-on: "ubuntu-22.04"
strategy:
matrix:
php:
- '8.1'
steps:
- uses: actions/checkout@v3

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: 'pdo_sqlite, gd'
tools: cs2pr

- uses: ramsey/composer-install@v2
with:
dependency-versions: "highest"

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr

deptrac:
name: Deptrac
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deptrac
uses: smoench/deptrac-action@master

tests:
name: Tests
runs-on: "ubuntu-22.04"
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
php:
- '7.4'
- '8.1'
- '8.2'

steps:
- uses: actions/checkout@v2

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_sqlite, gd
tools: cs2pr

- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
composer-options: "--prefer-dist --no-progress --no-suggest"

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run PHPStan analysis
run: composer run-script phpstan

- name: Run test suite
run: composer run-script --timeout=600 test
26 changes: 26 additions & 0 deletions .github/workflows/frontend-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Frontend build

on:
push:
paths:
- "**.js"
branches:
- main
- '[0-9]+.[0-9]+'
pull_request:
paths:
- "**.js"

jobs:
frontend-test:
name: Frontend build test
runs-on: "ubuntu-20.04"
timeout-minutes: 5

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: yarn install
- run: yarn test
90 changes: 90 additions & 0 deletions .github/workflows/template-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Template Cleanup
on:
push:
branches:
- main

jobs:

template-cleanup:
name: Template Cleanup
runs-on: ubuntu-latest
if: github.event.repository.name != 'bundle-template'
permissions:
contents: write
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
extensions: pdo_sqlite, gd
tools: cs2pr

- name: Get bundle generator
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ibexa/bundle-generator
path: .generator

- name: "Install composer and dependencies"
run: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php composer.phar install -d .generator
# Cleanup project
- name: Cleanup
run: |
export LC_CTYPE=C
export LANG=C
# Prepare variables
NAME="${GITHUB_REPOSITORY##*/}"
ACTOR=$(echo $GITHUB_ACTOR)
PACKAGE_NAME=$(echo $NAME | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
VENDOR_NAME=$(echo $ACTOR | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
VENDOR_NAMESPACE=$(echo $ACTOR | sed 's/\<./\U&/g' | sed 's/[^a-zA-Z0-9]//g')
# Converts repository name to UpperCamelCase (if separated by "-")
_temp=(${NAME//-/ })
BUNDLE_NAME=$(printf %s "${_temp[@]^}")
# Remove lines marked with #REMOVE-ON-CLEANUP#
find . -type f -exec sed -i '/#REMOVE-ON-CLEANUP#/d' {} +
# Run generator
echo Running generator with: php .generator/bin/ibexa-bundle-generator $PACKAGE_NAME $PACKAGE_NAME-dir --vendor-name=$VENDOR_NAME --vendor-namespace=$VENDOR_NAMESPACE --bundle-name=$BUNDLE_NAME --skeleton-name=extension
php .generator/bin/ibexa-bundle-generator $PACKAGE_NAME $PACKAGE_NAME-dir --vendor-name=$VENDOR_NAME --vendor-namespace=$VENDOR_NAMESPACE --bundle-name=$BUNDLE_NAME --skeleton-name=extension
# Remove ibexa/bundle-template workflows
rm -rf .github
# Move content
cp -R $PACKAGE_NAME-dir/. .
# Cleanup
rm -rf \
.github/readme \
.github/template-cleanup \
.github/workflows/template-cleanup.yml \
.generator composer-setup.php composer.phar \
$PACKAGE_NAME-dir
# Commit modified files
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Template cleanup"
# Push changes
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: main
github_token: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (C) 1999-2021 Ibexa AS (formerly eZ Systems AS). All rights reserved.

This source code is available separately under the following licenses:

A - Ibexa Business Use License Agreement (Ibexa BUL),
version 2.4 or later versions (as license terms may be updated from time to time)
Ibexa BUL is granted by having a valid Ibexa DXP (formerly eZ Platform Enterprise) subscription,
as described at: https://www.ibexa.co/product
For the full Ibexa BUL license text, please see:
- LICENSE-bul file placed in the root of this source code, or
- https://www.ibexa.co/software-information/licenses-and-agreements (latest version applies)

AND

B - Ibexa Trial and Test License Agreement (Ibexa TTL),
version 2.2 or later versions (as license terms may be updated from time to time)
Trial can be granted by Ibexa, reach out to Ibexa AS for evaluation access: https://www.ibexa.co/about-ibexa/contact-us
For the full Ibexa TTL license text, please see:
- LICENSE file placed in the root of this source code, or
- https://www.ibexa.co/software-information/licenses-and-agreements (latest version applies)
Loading

0 comments on commit 443592f

Please sign in to comment.