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

feat: add automation, linting and improve DX #174

Draft
wants to merge 48 commits into
base: 2.x
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
2258e90
fix: .editorconfig
lotyp Mar 27, 2024
c8c6e57
feat: add .env file for local development and testing
lotyp Mar 27, 2024
35218e4
fix: production release should not contain development files
lotyp Mar 27, 2024
e963a39
feat: add pre-commit config file
lotyp Mar 27, 2024
fa62923
feat: add self-documenting Makefile and docker-compose for local dev …
lotyp Mar 27, 2024
cedd95e
docs: mention make commands in CONTRIBUTING.md
lotyp Mar 27, 2024
c3bdc70
feat!: bump minimal php version from 8.0 to 8.1
lotyp Mar 27, 2024
43b6b87
feat: add wayofdev/php-cs-fixer and roave/security-advisories
lotyp Mar 27, 2024
6e6a07c
feat: remove style-ci dependency
lotyp Mar 27, 2024
1a01cfb
chore: move CODE_OF_CONDUCT
lotyp Mar 27, 2024
397b07a
feat: add yamllint
lotyp Mar 27, 2024
8a7014f
chore: return back .styleci, as it bloats commits
lotyp Mar 27, 2024
2cbbff8
feat: add googleapis/release-please auto changelog generator configs
lotyp Mar 27, 2024
d8ae4ac
chore(feat/infra-dx-v2): release 3.0.0
lotyp Mar 27, 2024
9856508
docs: convert CHANGELOG.md to follow release-please format
lotyp Mar 27, 2024
ef9f758
feat: introduce .build directory to move various tool cache into one …
lotyp Mar 27, 2024
c4a6d3f
ci: add release-please github action
lotyp Mar 28, 2024
b7b65c5
ci: refactoring github actions
lotyp Mar 28, 2024
17aac80
style: lint composer.json using `composer normalize` command
lotyp Mar 28, 2024
d686f42
ci: fix target branch for new CI actions
lotyp Mar 28, 2024
66a618b
ci: run coverage against sqlite
lotyp Mar 28, 2024
5ff4a40
chore: trigger actions to check if composer cache works
lotyp Mar 28, 2024
99ca6a5
ci: add coding-standards job
lotyp Mar 28, 2024
ef18b28
ci: add static-analysis job
lotyp Mar 28, 2024
014fe00
ci: fix concurrency, set psalm format to github output
lotyp Mar 28, 2024
d4f889b
deps(composer): add psalm/plugin-phpunit dependency
lotyp Mar 28, 2024
3a70d7c
ci: add mutation-testing job
lotyp Mar 28, 2024
831fb04
ci: add action to test against pgsql
lotyp Mar 28, 2024
fa3c4d0
ci: fix version for php setup action
lotyp Mar 28, 2024
522cdca
fix: typo in gh-actions
lotyp Mar 28, 2024
7b555e8
ci: add postgres service as depdendency
lotyp Mar 28, 2024
edc3eb8
ci: run only postgres tests against pgsql integration
lotyp Mar 28, 2024
8ba7bcc
feat: add initial psalm baseline file
lotyp Mar 28, 2024
d421d64
ci: fix infection tests
lotyp Mar 28, 2024
93d2036
ci: fix mutation tests github action
lotyp Mar 28, 2024
ea07603
ci: add mysql integration action
lotyp Mar 28, 2024
822ca9b
chore: switch to latesst tag in mysql
lotyp Mar 28, 2024
1cf29cc
ci: fix mysql integration action
lotyp Mar 28, 2024
a428d00
ci: add sqlserver (mssql) action
lotyp Mar 28, 2024
2387dbb
ci: add pdo dependencies to php, increase sqlserver health-checks
lotyp Mar 28, 2024
7b5da77
ci: remove health-checks for sqlserver
lotyp Mar 28, 2024
d1c96e1
ci: fix password for SA account of mssql
lotyp Mar 28, 2024
6ec430e
feat: add security and dependency analysis
lotyp Mar 29, 2024
a5ad866
ci: coding standards improvements
lotyp Mar 29, 2024
1355dda
chore: remove unused classes
lotyp Mar 29, 2024
cdeceaa
fix: psalm errors
lotyp Mar 29, 2024
2d6b5b0
feat: make commit runs through docker now
lotyp Mar 31, 2024
bbeb2f2
chore: same pass for all dbs
lotyp Apr 1, 2024
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
Prev Previous commit
Next Next commit
ci: fix mysql integration action
lotyp committed Mar 28, 2024
commit 1cf29cc3ea7e928e27a9c916bc2561101aab1dbb
2 changes: 1 addition & 1 deletion .github/workflows/ci-mysql.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ jobs:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
options: >-
--health-cmd mysqladmin ping
--health-cmd="mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5

Unchanged files with check annotations Beta

public function withPrefix(string $prefix, bool $add = true): DatabaseInterface
{
$database = clone $this;

Check warning on line 82 in src/Database.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ } public function withPrefix(string $prefix, bool $add = true) : DatabaseInterface { - $database = clone $this; + $database = $this; $add ? $database->prefix .= $prefix : ($database->prefix = $prefix); return $database; }
$add ? $database->prefix .= $prefix : $database->prefix = $prefix;
$result = [];
foreach ($schemaHandler->getTableNames($this->prefix) as $table) {
$table = str_contains($table, '.')

Check warning on line 111 in src/Database.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "Ternary": --- Original +++ New @@ @@ $schemaHandler = $this->getDriver(self::READ)->getSchemaHandler(); $result = []; foreach ($schemaHandler->getTableNames($this->prefix) as $table) { - $table = str_contains($table, '.') ? str_replace('.' . $this->prefix, '.', $table) : substr($table, strlen($this->prefix)); + $table = str_contains($table, '.') ? substr($table, strlen($this->prefix)) : str_replace('.' . $this->prefix, '.', $table); $result[] = new Table($this, $table); } return $result;
? str_replace('.' . $this->prefix, '.', $table)
: substr($table, strlen($this->prefix));

Check warning on line 113 in src/Database.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "UnwrapSubstr": --- Original +++ New @@ @@ $schemaHandler = $this->getDriver(self::READ)->getSchemaHandler(); $result = []; foreach ($schemaHandler->getTableNames($this->prefix) as $table) { - $table = str_contains($table, '.') ? str_replace('.' . $this->prefix, '.', $table) : substr($table, strlen($this->prefix)); + $table = str_contains($table, '.') ? str_replace('.' . $this->prefix, '.', $table) : $table; $result[] = new Table($this, $table); } return $result;
$result[] = new Table($this, $table);
}
try {
$result = $callback($this);
$this->commit();

Check warning on line 189 in src/Database.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $this->begin($isolationLevel); try { $result = $callback($this); - $this->commit(); + return $result; } catch (Throwable $e) { $this->rollback();
return $result;
} catch (Throwable $e) {
$params->push(new Parameter($tokens['offset']));
}
return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null);

Check warning on line 73 in src/Driver/Compiler.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ if ($tokens['offset'] !== null) { $params->push(new Parameter($tokens['offset'])); } - return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null); + return '_' . ($tokens['limit'] !== null) . '_' . ($tokens['offset'] === null); } /** * @psalm-return non-empty-string

Check warning on line 73 in src/Driver/Compiler.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ if ($tokens['offset'] !== null) { $params->push(new Parameter($tokens['offset'])); } - return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null); + return ($tokens['limit'] === null) . '_' . '_' . ($tokens['offset'] === null); } /** * @psalm-return non-empty-string

Check warning on line 73 in src/Driver/Compiler.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ if ($tokens['offset'] !== null) { $params->push(new Parameter($tokens['offset'])); } - return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null); + return ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null); } /** * @psalm-return non-empty-string

Check warning on line 73 in src/Driver/Compiler.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ if ($tokens['offset'] !== null) { $params->push(new Parameter($tokens['offset'])); } - return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null); + return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] !== null); } /** * @psalm-return non-empty-string
}
/**
switch ($fragment->getType()) {
case self::FRAGMENT:
foreach ($tokens['parameters'] as $param) {

Check warning on line 89 in src/Driver/Compiler.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "Foreach_": --- Original +++ New @@ @@ $tokens = $fragment->getTokens(); switch ($fragment->getType()) { case self::FRAGMENT: - foreach ($tokens['parameters'] as $param) { + foreach (array() as $param) { $params->push($param); } return $tokens['fragment'];
$params->push($param);

Check warning on line 90 in src/Driver/Compiler.php

GitHub Actions / mutation-testing (ubuntu-latest, 8.1, locked)

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ switch ($fragment->getType()) { case self::FRAGMENT: foreach ($tokens['parameters'] as $param) { - $params->push($param); + } return $tokens['fragment']; case self::EXPRESSION:
}
return $tokens['fragment'];