Skip to content

Commit

Permalink
[github] adatbazis migracios workflow (#219)
Browse files Browse the repository at this point in the history
* [ci] adatbázis migrációs teszt környezet

* cleanup

* [github] database migration workflow es teszt adatok

* [composer] lock mostantol nem jatszik

* [doctrine] db suffix nem baj ha configuralhato

* [ci] db migration test specifikus phpunit config: DAMA-t ki kell kapcsolni

* [tests] ki lehessen hagyni az adatbazis letrahozast

* [ci] elso migteszt user load

* [migrations] javitasok a felmerult hibak fenyeben
  • Loading branch information
connorhu committed Feb 19, 2024
1 parent a2b9bfc commit 725cbc3
Show file tree
Hide file tree
Showing 12 changed files with 899 additions and 10,477 deletions.
3 changes: 3 additions & 0 deletions .ci/github/db-migration-tests.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
DATABASE_SUFFIX=""
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
bootstrap="../../../tests/bootstrap.php">
<php>
<ini name="display_errors" value="1" />
<ini name="error_reporting" value="-1" />
<ini name="date.timezone" value="Europe/Budapest" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="9.6" />
<env name="DATABASE_SUFFIX" value="" />
<env name="SKIP_DB_CREATE" value="true" />
</php>

<testsuites>
Expand All @@ -20,6 +25,10 @@
<testsuite name="application">
<directory>../../../tests/ApplicationTests</directory>
</testsuite>

<testsuite name="db_migration">
<directory>../../../tests/DatabaseMigrationTests</directory>
</testsuite>
</testsuites>

<coverage processUncoveredFiles="true">
Expand All @@ -31,8 +40,4 @@
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>

<extensions>
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension"/>
</extensions>
</phpunit>
27 changes: 27 additions & 0 deletions .docker/mysql/data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Gép: mysql:3306
-- Létrehozás ideje: 2023. Jún 10. 14:19
-- Kiszolgáló verziója: 5.7.42
-- PHP verzió: 8.1.15

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";

SET GLOBAL sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

INSERT INTO `user` (`uid`, `login`, `jelszo`, `jogok`, `regdatum`, `lastlogin`, `lastactive`, `email`, `notifications`, `becenev`, `nev`, `volunteer`) VALUES
(1, 'admin', '$2y$10$EBPN6VkozCpnTYjmbo5z/egO.ZozlXbIizohH6MEIN5dU0DPO0cnO', 'miserend-user', '0000-00-00 00:00:00', '2023-08-14 08:41:53', '2023-08-14 08:42:51', 'admin@miserend.nomail', 0, 'Adminka', 'Admin Admin', 0);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Loading

0 comments on commit 725cbc3

Please sign in to comment.