Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade codeigniter to last version #79

Merged
merged 8 commits into from
Feb 1, 2021
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
55 changes: 24 additions & 31 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
name: boilerplate build
name: "ci build"

on:
push:
branches:
- master
pull_request:
branches:
- master
push:
branches:
- "master"

jobs:
build:

name: PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest

if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: false
matrix:
php-versions: ['7.3', '7.4']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: '7.2'
extension-csv: intl, json, mbstring, mysqlnd. xdebug, xml
coverage: xdebug
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop
- name: Setup MySQL
uses: samin/[email protected]
with:
mysql version: 5.7
mysql password: test
mysql user: test
mysql database: boilerplate-test
- name: Checkout
uses: actions/checkout@v2
- name: "Validate composer.json and composer.lock"
run: "composer validate"
- name: "Install dependencies"
run: "composer install"
- name: "Run test suite"
run: "composer test -- -c phpunit.xml.github-actions.dist"
- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
extensions: intl, json, mbstring, xdebug, xml
php-version: "${{ matrix.php-versions }}"
coverage: xdebug
- name: Checkout
uses: actions/checkout@v2
- name: "Validate composer.json and composer.lock"
run: "composer validate"
- name: "Install dependencies"
run: "composer install --prefer-source --no-progress --no-suggest"
- name: "Run test suite"
run: "composer test"
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
}
],
"require": {
"php": ">7.2",
"php": "^7.3 || ^8.0",
"myth/auth": "dev-develop",
"codeigniter4/framework": "^4.1",
"codeigniter4/translations" : "^4.0"
},
"require-dev": {
"codeigniter4/framework": "^4.0",
"phpunit/phpunit": "8.5.*",
"fakerphp/faker": "^1.10"
"phpunit/phpunit": "^9.1",
"fakerphp/faker": "^1.13"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
8 changes: 2 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@
<const name="HOMEPATH" value="./"/>
<const name="CONFIGPATH" value="./vendor/codeigniter4/framework/app/Config/"/>
<const name="PUBLICPATH" value="./vendor/codeigniter4/framework/public/"/>
<env name="database.tests.hostname" value="localhost"/>
<env name="database.tests.database" value="boilerplate-test"/>
<env name="database.tests.username" value="root"/>
<env name="database.tests.password" value=""/>
<env name="database.tests.DBDriver" value="MySQLi"/>
<env name="database.tests.DBPrefix" value=""/>
<env name="database.tests.database" value=":memory:"/>
<env name="database.tests.DBDriver" value="SQLite3"/>
</php>
</phpunit>
52 changes: 0 additions & 52 deletions phpunit.xml.github-actions.dist

This file was deleted.

40 changes: 20 additions & 20 deletions tests/Controllers/ExampleTest.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?php
namespace Tests\Controllers;
use App\Controllers\Home;
use CodeIgniter\Test\ControllerTester;
use Tests\Support\AuthTestCase;
class ExampleTest extends AuthTestCase
{
use ControllerTester;
public function testIndexHome()
{
$result = $this->controller(Home::class)
->execute('index');
$this->assertTrue($result->isOK());
}
}
<?php

namespace Tests\Controllers;

use App\Controllers\Home;
use CodeIgniter\Test\ControllerTester;
use Tests\Support\AuthTestCase;

class ExampleTest extends AuthTestCase
{
use ControllerTester;

public function testIndexHome()
{
$result = $this->controller(Home::class)
->execute('index');

$this->assertTrue($result->isOK());
}
}
Loading