Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 29 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,32 @@ on:
name: build

jobs:
codeception:
uses: php-forge/actions/.github/workflows/codeception.yml@main
secrets:
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
codeception-command: vendor/bin/codecept run --env php-builtin --coverage-xml
coverage-file: runtime/output/coverage.xml
extensions: gd, intl, pcov
nginx:
runs-on: ubuntu-latest

steps:
- name: Checkout.
uses: actions/checkout@v5

- name: Show docker version.
run: |
docker version
docker compose version

- name: Build and start containers.
run: docker compose up -d --build

- name: Wait for readiness.
run: |
for i in {1..60}; do
if docker exec yii2-nginx sh -lc "curl -ksS -o /dev/null -w '%{http_code}' https://localhost | grep -qE '200|302'"; then
echo "Service is ready"; exit 0; fi
sleep 2
done
echo "Service not ready"; docker logs yii2-nginx; exit 1

- name: Codeceptcion build.
run: docker exec yii2-nginx vendor/bin/codecept build

- name: Run codeception tests.
run: docker exec yii2-nginx vendor/bin/codecept run
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- Bug #172: Update badge label from `PHPUnit` to `Codeception` in `README.md` (@terabytesoftw)
- Bug #175: Update allowed IPs in configuration for development purposes in `configuration.md` (@terabytesoftw)
- Bug #177: Add missing config path to ECS configuration in `ecs.php` (@terabytesoftw)
- Enh #181: Implement `Nginx` stack (@terabytesoftw)
- Bug #182: Improve clarity in deployment options description and add `Nginx` badge in `README.md` (@terabytesoftw)

## 0.1.0 August 31, 2025

Expand Down
41 changes: 9 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<img src="https://img.shields.io/badge/22.0.x-0073AA.svg?style=for-the-badge&logo=yii&logoColor=white" alt="Yii 22.0.x">
</a>
<a href="https://github.com/yii2-extensions/app-basic/actions/workflows/build.yml" target="_blank">
<img src="https://img.shields.io/github/actions/workflow/status/yii2-extensions/app-basic/build.yml?branch=main&style=for-the-badge&label=Codeception" alt="Codeception">
<img src="https://img.shields.io/github/actions/workflow/status/yii2-extensions/app-basic/build.yml?branch=nginx&style=for-the-badge&label=Codeception" alt="Codeception">
</a>
<a href="https://github.com/yii2-extensions/app-basic/actions/workflows/static.yml" target="_blank">
<img src="https://img.shields.io/github/actions/workflow/status/yii2-extensions/app-basic/static.yml?branch=main&style=for-the-badge&label=PHPStan" alt="PHPStan">
<img src="https://img.shields.io/github/actions/workflow/status/yii2-extensions/app-basic/static.yml?branch=nginx&style=for-the-badge&label=PHPStan" alt="PHPStan">
</a>
</p>

Expand All @@ -40,23 +40,6 @@ A modern, Bootstrap 5-powered Yii2 application template designed for rapid web-a
- ✅ **Modern Bootstrap 5 UI** - Responsive, mobile-first design with latest Bootstrap components.
- ✅ **Testing Ready** - Codeception test suite with examples for functional and unit testing.

## Available deployment options

### Traditional Web Servers

Classic request-per-process model; simple, widely supported (for example, Apache).

[![Apache](https://img.shields.io/badge/apache-%23D42029.svg?style=for-the-badge&logo=apache&logoColor=white)](https://github.com/yii2-extensions/app-basic/tree/apache)

### High-Performance Worker Mode

Long-running PHP workers for higher throughput and lower latency.

[![FrankenPHP](https://img.shields.io/badge/FrankenPHP-777BB4?style=for-the-badge&logo=php&logoColor=white)](https://github.com/yii2-extensions/app-basic/tree/franken-php)
[![RoadRunner](https://img.shields.io/badge/RoadRunner-%23FF6B35.svg?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJMMjIgMTJMMTIgMjJMMiAxMkwxMiAyWiIgZmlsbD0iI0ZGRkZGRiIvPgo8cGF0aCBkPSJNOCAyTDE2IDEwTDggMThaIiBmaWxsPSIjRkY2QjM1Ii8+CjxwYXRoIGQ9Ik0xNiA2TDIwIDEwTDE2IDE0WiIgZmlsbD0iI0ZGNkIzNSIvPgo8L3N2Zz4K&logoColor=white)](https://github.com/yii2-extensions/app-basic/tree/road-runner)

> For setup instructions, see `README.md` in each branch.

## How it works

The Yii2 Web Application Basic template provides a complete foundation for building modern web applications. Unlike starting from scratch, this template includes.
Expand All @@ -78,23 +61,19 @@ The Yii2 Web Application Basic template provides a complete foundation for build
### Installation

```bash
composer create-project --prefer-dist yii2-extensions/app-basic:^0.1 app-basic
composer create-project --prefer-dist yii2-extensions/app-basic:dev-nginx app-basic
cd app-basic
```

### Quick start

Start development server
Start Nginx

```bash
# Using built-in PHP server
php -S localhost:8080 -t web

# Or using Yii console command
./yii serve
docker-compose up -d
```

> Your application will be available at `http://localhost:8080` or at the address set in `--address` option.
> Your application will be available at `https://localhost:8443`.

#### Directory structure

Expand Down Expand Up @@ -153,15 +132,13 @@ final class SiteController extends Controller

## Package information

[![Latest Stable Version](https://img.shields.io/packagist/v/yii2-extensions/app-basic.svg?style=for-the-badge&logo=packagist&logoColor=white&label=Stable)](https://packagist.org/packages/yii2-extensions/app-basic)
[![Total Downloads](https://img.shields.io/packagist/dt/yii2-extensions/app-basic.svg?style=for-the-badge&logo=packagist&logoColor=white&label=Downloads)](https://packagist.org/packages/yii2-extensions/app-basic)

[![Development Status](https://img.shields.io/badge/Status-Dev-orange.svg?style=for-the-badge&logo=packagist&logoColor=white)](https://github.com/yii2-extensions/app-basic/tree/nginx)

## Quality code

[![Codecov](https://img.shields.io/codecov/c/github/yii2-extensions/app-basic.svg?branch=main&style=for-the-badge&logo=codecov&logoColor=white&label=Coverage)](https://codecov.io/github/yii2-extensions/app-basic)
[![Codecov](https://img.shields.io/codecov/c/github/yii2-extensions/app-basic.svg?branch=nginx&style=for-the-badge&logo=codecov&logoColor=white&label=Coverage)](https://codecov.io/github/yii2-extensions/app-basic)
[![PHPStan Level Max](https://img.shields.io/badge/PHPStan-Level%20Max-4F5D95.svg?style=for-the-badge&logo=php&logoColor=white)](https://github.com/yii2-extensions/app-basic/actions/workflows/static.yml)
[![StyleCI](https://img.shields.io/badge/StyleCI-Passed-44CC11.svg?style=for-the-badge&logo=styleci&logoColor=white)](https://github.styleci.io/repos/165419144?branch=main)
[![StyleCI](https://img.shields.io/badge/StyleCI-Passed-44CC11.svg?style=for-the-badge&logo=styleci&logoColor=white)](https://github.styleci.io/repos/165419144?branch=nginx)

## Documentation

Expand Down
1 change: 0 additions & 1 deletion codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ paths:
output: runtime/output
data: tests/Support/data
support: tests/Support
envs: tests/_envs
actor_suffix: Tester
settings:
memory_limit: 1024M
Expand Down
Loading
Loading