Skip to content

Commit

Permalink
Added bundle structure
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Sep 4, 2024
0 parents commit f65c108
Show file tree
Hide file tree
Showing 38 changed files with 1,106 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "eslint-config-ibexa/eslint"
}
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
18 changes: 18 additions & 0 deletions .github/workflows/browser-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Browser tests

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

jobs:
browser-tests:
name: "Browser tests"
uses: ibexa/gh-workflows/.github/workflows/browser-tests.yml@main
with:
project-edition: 'oss'
test-suite: '--profile=browser --suite=core-search --config=vendor/ibexa/core-search/behat_suites.yaml'
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
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
10 changes: 10 additions & 0 deletions .github/workflows/pr-assign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Assign Pull Request to maintainers

on:
pull_request_target: ~

jobs:
assign:
uses: ibexa/gh-workflows/.github/workflows/pr-assign.yml@main
secrets:
robot-token: ${{ secrets.EZROBOT_PAT }}
12 changes: 12 additions & 0 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: PR check
on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited

jobs:
test-base-branch:
uses: ibexa/gh-workflows/.github/workflows/pr-check.yml@main
44 changes: 44 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Automatic Changelog Generator for tag

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

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set Environment
run: |
echo "BUILD_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Get previous release tag based on type
id: prevrelease
uses: ibexa/version-logic-action@master
with:
currentTag: ${{ env.BUILD_TAG }}

- name: Generate changelog
id: changelog
uses: ibexa/changelog-generator-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
jira_token: ${{ secrets.JIRA_TOKEN }}
currentTag: ${{ env.BUILD_TAG }}
previousTag: ${{ steps.prevrelease.outputs.previousTag }}

- name: Print the changelog
run: echo "${{ steps.changelog.outputs.changelog }}"

- name: Create Release
id: create_release
uses: zendesk/action-create-release@v1
with:
tag_name: ${{ env.BUILD_TAG }}
body: |
${{ steps.changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.php-cs-fixer.cache
/.phpunit.result.cache
/composer.lock
/node_modules/
/vendor
/yarn.lock
14 changes: 14 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

return \Ibexa\CodeStyle\PhpCsFixer\InternalConfigFactory::build()->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->files()->name('*.php')
);
18 changes: 18 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Copyright (C) 1999-2024 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.3 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 - GNU General Public License, version 2
Grants an copyleft open source license with ABSOLUTELY NO WARRANTY. For the full GPL license text, please see:
- LICENSE file placed in the root of this source code, or
- https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Loading

0 comments on commit f65c108

Please sign in to comment.