Skip to content

Commit a828fdb

Browse files
committed
Initial commit
0 parents  commit a828fdb

File tree

76 files changed

+5142
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+5142
-0
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: PHP CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: codeigniter4-ci-${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
php-tests:
18+
name: PHP 8.2 / CodeIgniter 4.3
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Checkout local Perfbase PHP SDK
26+
uses: actions/checkout@v4
27+
with:
28+
repository: perfbaseorg/php-sdk
29+
path: lib-php-sdk-src
30+
31+
- name: Link sibling SDK checkout
32+
run: ln -s "$GITHUB_WORKSPACE/lib-php-sdk-src" "$GITHUB_WORKSPACE/../lib-php-sdk"
33+
34+
- name: Set up PHP
35+
uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: '8.2'
38+
coverage: pcov
39+
tools: composer
40+
extensions: pcntl
41+
42+
- name: Install dependencies
43+
run: composer update --with-all-dependencies --prefer-dist --no-progress --no-interaction codeigniter4/framework:^4.3.8
44+
45+
- name: Run PHPStan
46+
run: composer run phpstan
47+
48+
- name: Run PHPUnit
49+
run: composer run test -- --coverage-text
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Compatibility Probe
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
9+
concurrency:
10+
group: codeigniter4-compat-${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
compatibility:
15+
name: PHP ${{ matrix.php }} / CodeIgniter ${{ matrix.framework }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- php: '8.2'
22+
framework: '4.3.8'
23+
ignore_php_platform: false
24+
- php: '8.2'
25+
framework: '4.4.8'
26+
ignore_php_platform: false
27+
- php: '8.2'
28+
framework: '4.5.8'
29+
ignore_php_platform: false
30+
- php: '8.2'
31+
framework: '4.6.5'
32+
ignore_php_platform: false
33+
- php: '8.4'
34+
framework: '4.7.2'
35+
ignore_php_platform: false
36+
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
- name: Checkout local Perfbase PHP SDK
42+
uses: actions/checkout@v4
43+
with:
44+
repository: perfbaseorg/php-sdk
45+
path: lib-php-sdk-src
46+
47+
- name: Link sibling SDK checkout
48+
run: ln -s "$GITHUB_WORKSPACE/lib-php-sdk-src" "$GITHUB_WORKSPACE/../lib-php-sdk"
49+
50+
- name: Set up PHP
51+
uses: shivammathur/setup-php@v2
52+
with:
53+
php-version: ${{ matrix.php }}
54+
coverage: none
55+
tools: composer
56+
extensions: pcntl
57+
58+
- name: Install dependencies
59+
run: |
60+
composer config audit.block-insecure false
61+
composer require --no-interaction --no-progress --no-update codeigniter4/framework:${{ matrix.framework }}
62+
composer update \
63+
--with-all-dependencies \
64+
--prefer-dist \
65+
--no-progress \
66+
--no-interaction \
67+
${{ matrix.ignore_php_platform && '--ignore-platform-req=php' || '' }} \
68+
codeigniter4/framework
69+
70+
- name: Run PHPStan
71+
run: composer run phpstan
72+
73+
- name: Run PHPUnit
74+
run: composer run test -- --no-coverage --do-not-fail-on-risky

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
vendor/
2+
.idea/
3+
.vscode/
4+
.DS_Store
5+
.phpunit.result.cache
6+
.phpunit.cache/
7+
composer.lock
8+
9+
writable/*
10+
!writable/cache/
11+
!writable/logs/
12+
!writable/session/
13+
!writable/uploads/
14+
writable/cache/*
15+
!writable/cache/.gitkeep
16+
writable/logs/*
17+
!writable/logs/.gitkeep
18+
writable/session/*
19+
!writable/session/.gitkeep
20+
writable/uploads/*
21+
!writable/uploads/.gitkeep

0 commit comments

Comments
 (0)