Skip to content

Commit f6df3ae

Browse files
authored
Merge pull request #3 from AuroraWebSoftware/development
Development
2 parents 23eda8e + 770aba4 commit f6df3ae

File tree

9 files changed

+122
-56
lines changed

9 files changed

+122
-56
lines changed

.github/workflows/run-tests.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,26 @@ jobs:
2222

2323
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2424

25+
services:
26+
mysql:
27+
image: mysql:8.0
28+
ports:
29+
- 3306
30+
env:
31+
MYSQL_ROOT_PASSWORD: aissue
32+
MYSQL_PASSWORD: aissue
33+
MYSQL_USER: aissue
34+
MYSQL_DATABASE: aissue
35+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
36+
2537
steps:
38+
39+
- name: Verify Mysql connection
40+
run: |
41+
mysql --version
42+
sudo apt-get install -y mysql-client
43+
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -uaissue -paissue -e "SHOW DATABASES"
44+
2645
- name: Checkout code
2746
uses: actions/checkout@v3
2847

@@ -45,3 +64,7 @@ jobs:
4564
4665
- name: Execute tests
4766
run: vendor/bin/pest
67+
env:
68+
DB_USERNAME: aauth
69+
DB_PASSWORD: aauth
70+
DB_PORT: ${{ job.services.mysql.ports[3306] }}

.github/workflows/update-changelog.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

database/migrations/create_aissue_table.php.stub

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
public function up()
10+
{
11+
Schema::create('aissue_issues', function (Blueprint $table) {
12+
$table->bigIncrements('id');
13+
$table->string('code')->nullable();
14+
$table->string('model_type');
15+
$table->bigIncrements('model_id');
16+
$table->bigIncrements('assignee_id');
17+
$table->bigIncrements('creater_id');
18+
$table->bigIncrements('issue_type_id');
19+
$table->string('summary');
20+
$table->string('description');
21+
$table->bigIncrements('priority');
22+
$table->string('status');
23+
$table->dateTime('duedate');
24+
$table->boolean('archived');
25+
$table->bigIncrements('archived_by');
26+
$table->dateTime('archived_at');
27+
$table->timestamps();
28+
});
29+
30+
Schema::create('aissue_issue_types', function (Blueprint $table) {
31+
$table->bigIncrements('id');
32+
$table->string('workflow');
33+
$table->string('name');
34+
$table->string('description');
35+
$table->timestamps();
36+
});
37+
38+
}
39+
40+
public function down(){
41+
Schema::dropIfExists('aissue_issues');
42+
Schema::dropIfExists('aissue_issue_types');
43+
}
44+
45+
};

docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: '3.7'
2+
3+
services:
4+
mariadb:
5+
image: mariadb:latest
6+
ports:
7+
- "33062:3306"
8+
volumes:
9+
- ~/apps/mariadb-aissue:/var/lib/mysql
10+
environment:
11+
- MYSQL_ROOT_PASSWORD=aissue
12+
- MYSQL_PASSWORD=aissue
13+
- MYSQL_USER=aissue
14+
- MYSQL_DATABASE=aissue
15+
networks:
16+
default:
17+
driver: bridge
18+
ipam:
19+
config:
20+
- subnet: 172.16.57.0/24

phpunit.xml.dist

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,15 @@
3636
<logging>
3737
<junit outputFile="build/report.junit.xml"/>
3838
</logging>
39+
<php>
40+
<env name="DB_CONNECTION" value="mysql"/>
41+
<env name="DB_USERNAME" value="aissue"/>
42+
<env name="DB_HOST" value="127.0.0.1"/>
43+
<env name="DB_PASSWORD" value="aissue"/>
44+
<env name="DB_DATABASE" value="aissue"/>
45+
<env name="DB_PORT" value="33062"/>
46+
<env name="CACHE_DRIVER" value="array"/>
47+
<env name="SESSION_DRIVER" value="array"/>
48+
<env name="QUEUE_DRIVER" value="sync"/>
49+
</php>
3950
</phpunit>

src/AIssueServiceProvider.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,18 @@ public function configurePackage(Package $package): void
1717
*/
1818
$package
1919
->name('aissue')
20-
->hasConfigFile()
21-
->hasViews()
22-
->hasMigration('create_aissue_table')
23-
->hasCommand(AIssueCommand::class);
20+
->hasConfigFile();
21+
// ->hasViews()
22+
// ->hasMigration('create_aissue_table')
23+
// ->hasCommand(AIssueCommand::class);
24+
}
25+
26+
public function boot()
27+
{
28+
parent::boot();
29+
30+
// load packages migrations
31+
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
32+
2433
}
2534
}

tests/ExampleTest.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/Unit/AIssueTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
it('starts', function () {
4+
$this->assertTrue(true);
5+
});
6+
7+
8+
test('passOrAbort', function () {
9+
expect(1)->toBeTruthy();
10+
});

0 commit comments

Comments
 (0)