Skip to content

Commit 477701c

Browse files
authored
Initial commit
0 parents  commit 477701c

File tree

7 files changed

+777
-0
lines changed

7 files changed

+777
-0
lines changed

.github/workflows/backend-ci.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Backend build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+'
8+
pull_request: ~
9+
10+
jobs:
11+
cs-fix:
12+
name: Run code style check
13+
runs-on: "ubuntu-22.04"
14+
strategy:
15+
matrix:
16+
php:
17+
- '8.1'
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Setup PHP Action
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
coverage: none
26+
extensions: 'pdo_sqlite, gd'
27+
tools: cs2pr
28+
29+
- uses: ramsey/composer-install@v2
30+
with:
31+
dependency-versions: "highest"
32+
33+
- name: Run code style check
34+
run: composer run-script check-cs -- --format=checkstyle | cs2pr
35+
36+
deptrac:
37+
name: Deptrac
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v3
41+
- name: Deptrac
42+
uses: smoench/deptrac-action@master
43+
44+
tests:
45+
name: Tests
46+
runs-on: "ubuntu-22.04"
47+
timeout-minutes: 10
48+
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
php:
53+
- '7.4'
54+
- '8.1'
55+
- '8.2'
56+
57+
steps:
58+
- uses: actions/checkout@v2
59+
60+
- name: Setup PHP Action
61+
uses: shivammathur/setup-php@v2
62+
with:
63+
php-version: ${{ matrix.php }}
64+
coverage: none
65+
extensions: pdo_sqlite, gd
66+
tools: cs2pr
67+
68+
- uses: "ramsey/composer-install@v1"
69+
with:
70+
dependency-versions: "highest"
71+
composer-options: "--prefer-dist --no-progress --no-suggest"
72+
73+
- name: Setup problem matchers for PHPUnit
74+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
75+
76+
- name: Run PHPStan analysis
77+
run: composer run-script phpstan
78+
79+
- name: Run test suite
80+
run: composer run-script --timeout=600 test

.github/workflows/frontend-ci.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Frontend build
2+
3+
on:
4+
push:
5+
paths:
6+
- "**.js"
7+
branches:
8+
- main
9+
- '[0-9]+.[0-9]+'
10+
pull_request:
11+
paths:
12+
- "**.js"
13+
14+
jobs:
15+
frontend-test:
16+
name: Frontend build test
17+
runs-on: "ubuntu-20.04"
18+
timeout-minutes: 5
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: actions/setup-node@v2
23+
with:
24+
node-version: '14'
25+
- run: yarn install
26+
- run: yarn test
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Template Cleanup
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
9+
template-cleanup:
10+
name: Template Cleanup
11+
runs-on: ubuntu-latest
12+
if: github.event.repository.name != 'bundle-template'
13+
permissions:
14+
contents: write
15+
steps:
16+
17+
# Check out current repository
18+
- name: Fetch Sources
19+
uses: actions/checkout@v2
20+
21+
- name: Setup PHP Action
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: 7.4
25+
coverage: none
26+
extensions: pdo_sqlite, gd
27+
tools: cs2pr
28+
29+
- name: Get bundle generator
30+
uses: actions/checkout@v2
31+
with:
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
repository: ibexa/bundle-generator
34+
path: .generator
35+
36+
- name: "Install composer and dependencies"
37+
run: |
38+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
39+
php composer-setup.php
40+
php composer.phar install -d .generator
41+
42+
# Cleanup project
43+
- name: Cleanup
44+
run: |
45+
export LC_CTYPE=C
46+
export LANG=C
47+
# Prepare variables
48+
NAME="${GITHUB_REPOSITORY##*/}"
49+
ACTOR=$(echo $GITHUB_ACTOR)
50+
PACKAGE_NAME=$(echo $NAME | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
51+
VENDOR_NAME=$(echo $ACTOR | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
52+
VENDOR_NAMESPACE=$(echo $ACTOR | sed 's/\<./\U&/g' | sed 's/[^a-zA-Z0-9]//g')
53+
54+
# Converts repository name to UpperCamelCase (if separated by "-")
55+
_temp=(${NAME//-/ })
56+
BUNDLE_NAME=$(printf %s "${_temp[@]^}")
57+
58+
# Remove lines marked with #REMOVE-ON-CLEANUP#
59+
find . -type f -exec sed -i '/#REMOVE-ON-CLEANUP#/d' {} +
60+
61+
# Run generator
62+
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
63+
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
64+
65+
# Remove ibexa/bundle-template workflows
66+
rm -rf .github
67+
68+
# Move content
69+
cp -R $PACKAGE_NAME-dir/. .
70+
71+
# Cleanup
72+
rm -rf \
73+
.github/readme \
74+
.github/template-cleanup \
75+
.github/workflows/template-cleanup.yml \
76+
.generator composer-setup.php composer.phar \
77+
$PACKAGE_NAME-dir
78+
# Commit modified files
79+
- name: Commit files
80+
run: |
81+
git config --local user.email "action@github.com"
82+
git config --local user.name "GitHub Action"
83+
git add .
84+
git commit -m "Template cleanup"
85+
# Push changes
86+
- name: Push changes
87+
uses: ad-m/github-push-action@master
88+
with:
89+
branch: main
90+
github_token: ${{ secrets.GITHUB_TOKEN }}

COPYRIGHT

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (C) 1999-2025 Ibexa AS (formerly eZ Systems AS). All rights reserved.
2+
3+
This source code is available separately under the following licenses:
4+
5+
A - Ibexa Business Use License Agreement (Ibexa BUL),
6+
version 2.4 or later versions (as license terms may be updated from time to time)
7+
Ibexa BUL is granted by having a valid Ibexa DXP (formerly eZ Platform Enterprise) subscription,
8+
as described at: https://www.ibexa.co/product
9+
For the full Ibexa BUL license text, please see:
10+
- LICENSE-bul file placed in the root of this source code, or
11+
- https://www.ibexa.co/software-information/licenses-and-agreements (latest version applies)
12+
13+
AND
14+
15+
B - Ibexa Trial and Test License Agreement (Ibexa TTL),
16+
version 2.2 or later versions (as license terms may be updated from time to time)
17+
Trial can be granted by Ibexa, reach out to Ibexa AS for evaluation access: https://www.ibexa.co/about-ibexa/contact-us
18+
For the full Ibexa TTL license text, please see:
19+
- LICENSE file placed in the root of this source code, or
20+
- https://www.ibexa.co/software-information/licenses-and-agreements (latest version applies)

0 commit comments

Comments
 (0)