Skip to content

Commit 91c6833

Browse files
authored
First implementation
1 parent f76094a commit 91c6833

38 files changed

+1706
-247
lines changed

Diff for: .editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ trim_trailing_whitespace = true
1212

1313
[*.md]
1414
trim_trailing_whitespace = false
15+
16+
[*.yml]
17+
indent_size = 2

Diff for: .gitattributes

+8-7
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222
*.ttf binary
2323

2424
# Ignore some meta files when creating an archive of this repository
25-
/.github export-ignore
26-
/.editorconfig export-ignore
27-
/.gitattributes export-ignore
28-
/.gitignore export-ignore
29-
/phpunit.xml.dist export-ignore
30-
/tests export-ignore
31-
/docs export-ignore
25+
/.github export-ignore
26+
/.editorconfig export-ignore
27+
/.gitattributes export-ignore
28+
/.gitignore export-ignore
29+
/codeception.yml export-ignore
30+
/dependency-checker.json export-ignore
31+
/psalm.xml export-ignore
32+
/tests export-ignore
3233

3334
# Avoid merge conflicts in CHANGELOG
3435
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/

Diff for: .github/workflows/build.yml

+67-58
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,74 @@
11
on:
2-
- pull_request
3-
- push
2+
- pull_request
3+
- push
44

55
name: build
66

77
jobs:
8-
tests:
9-
name: PHP ${{ matrix.php }}-${{ matrix.os }}
8+
tests:
9+
name: PHP ${{ matrix.php }}-${{ matrix.os }}
1010

11+
env:
12+
key: cache-v1
13+
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
os:
19+
- ubuntu-latest
20+
21+
php:
22+
- 7.4
23+
- 8.0
24+
25+
mysql:
26+
- 8.0
27+
28+
services:
29+
mysql:
30+
image: mysql:${{ matrix.mysql }}
1131
env:
12-
key: cache-v1
13-
14-
runs-on: ${{ matrix.os }}
15-
16-
strategy:
17-
matrix:
18-
os:
19-
- ubuntu-latest
20-
- windows-latest
21-
22-
php:
23-
- "7.4"
24-
- "8.0"
25-
26-
steps:
27-
- name: Checkout
28-
uses: actions/[email protected]
29-
30-
- name: Install PHP
31-
uses: shivammathur/setup-php@v2
32-
with:
33-
php-version: ${{ matrix.php }}
34-
ini-values: date.timezone='UTC'
35-
coverage: pcov
36-
tools: composer:v2
37-
38-
- name: Determine composer cache directory on Linux
39-
if: matrix.os == 'ubuntu-latest'
40-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
41-
42-
- name: Determine composer cache directory on Windows
43-
if: matrix.os == 'windows-latest'
44-
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
45-
46-
- name: Cache dependencies installed with composer
47-
uses: actions/cache@v2
48-
with:
49-
path: ${{ env.COMPOSER_CACHE_DIR }}
50-
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
51-
restore-keys: |
52-
php${{ matrix.php }}-composer-
53-
- name: Update composer
54-
run: composer self-update
55-
56-
- name: Install dependencies with composer php 7.4
57-
if: matrix.php == '7.4'
58-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
59-
60-
- name: Install dependencies with composer php 8.0
61-
if: matrix.php == '8.0'
62-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
63-
64-
- name: Run tests with phpunit
65-
run: vendor/bin/phpunit --colors=always
32+
MYSQL_ROOT_PASSWORD: root
33+
MYSQL_DATABASE: db_test
34+
ports:
35+
- 3306:3306
36+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
37+
38+
steps:
39+
- name: Checkout
40+
uses: actions/[email protected]
41+
42+
- name: Install PHP
43+
uses: shivammathur/setup-php@v2
44+
with:
45+
php-version: ${{ matrix.php }}
46+
ini-values: date.timezone='UTC'
47+
coverage: pcov
48+
tools: composer:v2
49+
50+
- name: Determine composer cache directory on Linux
51+
if: matrix.os == 'ubuntu-latest'
52+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
53+
54+
- name: Cache dependencies installed with composer
55+
uses: actions/cache@v2
56+
with:
57+
path: ${{ env.COMPOSER_CACHE_DIR }}
58+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
59+
restore-keys: |
60+
php${{ matrix.php }}-composer-
61+
62+
- name: Update composer
63+
run: composer self-update
64+
65+
- name: Install dependencies with composer php 7.4
66+
if: matrix.php == '7.4'
67+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
68+
69+
- name: Install dependencies with composer php 8.0
70+
if: matrix.php == '8.0'
71+
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
72+
73+
- name: Run tests with codeception
74+
run: vendor/bin/codecept run

Diff for: .github/workflows/dependency.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
- push
3+
4+
name: dependency checker
5+
6+
jobs:
7+
mutation:
8+
name: PHP ${{ matrix.php }}-${{ matrix.os }}
9+
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
17+
php:
18+
- 8.0
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: Install PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: "${{ matrix.php }}"
28+
tools: composer:v2, cs2pr
29+
coverage: none
30+
31+
- name: Determine composer cache directory
32+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
33+
34+
- name: Cache dependencies installed with composer
35+
uses: actions/cache@v2
36+
with:
37+
path: ${{ env.COMPOSER_CACHE_DIR }}
38+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
39+
restore-keys: |
40+
php${{ matrix.php }}-composer-
41+
42+
- name: Update composer
43+
run: composer self-update
44+
45+
- name: Install maglnet/composer-require-checker
46+
run: composer require maglnet/composer-require-checker
47+
48+
- name: Check dependency
49+
run: vendor/bin/composer-require-checker check --config-file=dependency-checker.json

Diff for: .github/workflows/mutation.yml

-56
This file was deleted.

Diff for: .github/workflows/static.yml

+46-44
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,51 @@
11
on:
2-
- pull_request
3-
- push
2+
- pull_request
3+
- push
44

55
name: static analysis
66

77
jobs:
8-
mutation:
9-
name: PHP ${{ matrix.php }}-${{ matrix.os }}
10-
11-
runs-on: ${{ matrix.os }}
12-
13-
strategy:
14-
matrix:
15-
os:
16-
- ubuntu-latest
17-
18-
php:
19-
- "7.4"
20-
21-
steps:
22-
- name: Checkout
23-
uses: actions/[email protected]
24-
25-
- name: Install PHP
26-
uses: shivammathur/setup-php@v2
27-
with:
28-
php-version: "${{ matrix.php }}"
29-
tools: composer:v2, cs2pr
30-
coverage: none
31-
32-
- name: Determine composer cache directory
33-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
34-
35-
- name: Cache dependencies installed with composer
36-
uses: actions/cache@v2
37-
with:
38-
path: ${{ env.COMPOSER_CACHE_DIR }}
39-
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
40-
restore-keys: |
41-
php${{ matrix.php }}-composer-
42-
- name: Update composer
43-
run: composer self-update
44-
45-
- name: Install dependencies with composer
46-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
47-
48-
- name: Static analysis
49-
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize
8+
mutation:
9+
name: PHP ${{ matrix.php }}-${{ matrix.os }}
10+
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
os:
16+
- ubuntu-latest
17+
18+
php:
19+
- 7.4
20+
- 8.0
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
26+
- name: Install PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: "${{ matrix.php }}"
30+
tools: composer:v2, cs2pr
31+
coverage: none
32+
33+
- name: Determine composer cache directory
34+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
35+
36+
- name: Cache dependencies installed with composer
37+
uses: actions/cache@v2
38+
with:
39+
path: ${{ env.COMPOSER_CACHE_DIR }}
40+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
41+
restore-keys: |
42+
php${{ matrix.php }}-composer-
43+
44+
- name: Update composer
45+
run: composer self-update
46+
47+
- name: Install dependencies with composer
48+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
49+
50+
- name: Static analysis
51+
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize

Diff for: .gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@
44
# composer
55
/vendor
66
/composer.lock
7-
8-
# phpunit
9-
/phpunit.xml
10-
/.phpunit.result.cache

Diff for: CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# _____ Change Log
1+
# Database Populator for Codeception DB Module Change Log
22

33
## 1.0.0 under development
44

0 commit comments

Comments
 (0)