From 265de2c04c4daca1ece2c46a57d20b0353918aa1 Mon Sep 17 00:00:00 2001 From: lotyp Date: Sun, 26 May 2024 16:32:11 +0300 Subject: [PATCH 1/8] ci: add dependency analysis workflow --- .github/workflows/ci.yml.dist | 78 -------------------- .github/workflows/dependency-analysis.yml | 87 +++++++++++++++++++++++ .github/workflows/static-analysis.yml | 12 ++++ 3 files changed, 99 insertions(+), 78 deletions(-) delete mode 100644 .github/workflows/ci.yml.dist create mode 100644 .github/workflows/dependency-analysis.yml diff --git a/.github/workflows/ci.yml.dist b/.github/workflows/ci.yml.dist deleted file mode 100644 index f2038016..00000000 --- a/.github/workflows/ci.yml.dist +++ /dev/null @@ -1,78 +0,0 @@ ---- - -on: # yamllint disable-line rule:truthy - push: - branches: - - master - pull_request: - branches: - - master - -name: ๐Ÿ” Continuous integration - -jobs: - integration: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: ["ubuntu-22.04"] - php: ["8.2"] - steps: - - name: ๐Ÿ“ฆ Check out the codebase - uses: actions/checkout@v4 - - - name: ๐Ÿ› ๏ธ Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: mbstring, fileinfo, pdo_mysql, pdo - ini-values: error_reporting=E_ALL - tools: composer:v2, pecl - coverage: xdebug - - - name: ๐Ÿ› ๏ธ Setup problem matchers - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: โ™ป๏ธ Restore cached dependencies - id: cached-composer-dependencies - uses: actions/cache@v4 - with: - path: vendor - key: vendor-${{ runner.os }}-${{ hashFiles('**/composer.lock') }}-${{ matrix.php }} - - - name: ๐Ÿ“ฅ Install dependencies - if: steps.cached-composer-dependencies.outputs.cache-hit != 'true' - run: composer install - - - name: ๐Ÿ› ๏ธ Prepare environment - run: | - mkdir -p ./.build/php-cs-fixer - mkdir -p ./.build/phpstan - mkdir -p ./.build/phpunit - - - name: ๐Ÿšจ Run coding standards task - run: composer cs:diff - env: - PHP_CS_FIXER_IGNORE_ENV: true - - - name: ๐Ÿงช Execute phpunit and pest tests - env: - XDEBUG_MODE: coverage - DB_CONNECTION: sqlite - DB_DATABASE: ":memory:" - run: vendor/bin/pest --coverage-clover=coverage.xml - - - name: ๐Ÿ” Run static analysis using phpstan - run: composer stan:ci - - - name: ๐Ÿ“ค Upload coverage report to Codecov - uses: codecov/codecov-action@v4.4.0 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml - verbose: true - -... diff --git a/.github/workflows/dependency-analysis.yml b/.github/workflows/dependency-analysis.yml new file mode 100644 index 00000000..a69bda3c --- /dev/null +++ b/.github/workflows/dependency-analysis.yml @@ -0,0 +1,87 @@ +--- + +name: ๐Ÿ” Dependency analysis + +on: # yamllint disable-line rule:truthy + push: + branches: + - master + paths: + - 'config/**' + - 'src/**' + - 'tests/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + - 'composer-require-checker.json' + pull_request: + branches: + - master + paths: + - 'config/**' + - 'src/**' + - 'tests/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + - 'composer-require-checker.json' + +jobs: + dependency-analysis: + timeout-minutes: 4 + runs-on: ${{ matrix.os }} + concurrency: + cancel-in-progress: true + group: dependency-analysis-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + strategy: + fail-fast: true + matrix: + os: + - ubuntu-latest + php-version: + - '8.2' + dependencies: + - locked + + steps: + - name: ๐Ÿ“ฆ Check out the codebase + uses: actions/checkout@v4.1.6 + + - name: ๐Ÿ› ๏ธ Setup PHP + uses: shivammathur/setup-php@2.30.4 + with: + php-version: ${{ matrix.php-version }} + extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql + ini-values: error_reporting=E_ALL + coverage: none + tools: phive + + - name: ๐Ÿ› ๏ธ Setup problem matchers + run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" + + - name: ๐Ÿค– Validate composer.json and composer.lock + run: composer validate --ansi --strict + + - name: ๐Ÿ” Get composer cache directory + uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0 + + - name: โ™ป๏ธ Restore cached dependencies installed with composer + uses: actions/cache@v4.0.2 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }} + restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + + - name: ๐Ÿ“ฅ Install "${{ matrix.dependencies }}" dependencies + uses: wayofdev/gh-actions/actions/composer/install@v3.1.0 + with: + dependencies: ${{ matrix.dependencies }} + + - name: ๐Ÿ“ฅ Install dependencies with phive + uses: wayofdev/gh-actions/actions/phive/install@v3.1.0 + with: + phive-home: '.phive' + trust-gpg-keys: 0xC00543248C87FB13,0x033E5F8D801A2F8D + + - name: ๐Ÿ”ฌ Run maglnet/composer-require-checker + run: .phive/composer-require-checker check --ansi --config-file="$(pwd)/composer-require-checker.json" --verbose diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index e905a4ba..8411390c 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -9,6 +9,12 @@ on: # yamllint disable-line rule:truthy - 'src/**' - 'tests/**' - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + - 'phpstan.neon.dist' + - 'phpstan-baseline.neon' + - 'psalm.xml' + - 'psalm-baseline.xml' pull_request: branches: - master @@ -17,6 +23,12 @@ on: # yamllint disable-line rule:truthy - 'src/**' - 'tests/**' - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + - 'phpstan.neon.dist' + - 'phpstan-baseline.neon' + - 'psalm.xml' + - 'psalm-baseline.xml' name: ๐Ÿ” Static analysis From fad5fcd9581fae14af0e5f0819b9580811fd969d Mon Sep 17 00:00:00 2001 From: lotyp Date: Sun, 26 May 2024 17:14:34 +0300 Subject: [PATCH 2/8] ci: add testing against mysql --- .github/workflows/testing-mysql.yml | 96 +++++++++++++++++++++++++++++ .github/workflows/testing.yml | 2 +- 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/testing-mysql.yml diff --git a/.github/workflows/testing-mysql.yml b/.github/workflows/testing-mysql.yml new file mode 100644 index 00000000..478f6634 --- /dev/null +++ b/.github/workflows/testing-mysql.yml @@ -0,0 +1,96 @@ +--- + +on: # yamllint disable-line rule:truthy + pull_request: + branches: + - master + push: + branches: + - master + +name: ๐Ÿงช Unit testing (MySQL) + +env: + DB_HOST: 127.0.0.1 + DB_PORT: 13306 + DB_USERNAME: cycle + DB_PASSWORD: SSpaSS__1_123 + DB_CONNECTION: mysql + +jobs: + test-mysql: + timeout-minutes: 4 + runs-on: ${{ matrix.os }} + concurrency: + cancel-in-progress: true + group: test-mysql-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }} + strategy: + fail-fast: true + matrix: + os: + - 'ubuntu-latest' + php-version: + - '8.2' + dependencies: + - locked + mysql-version: + - latest + + services: + mysql: + image: mysql:${{ matrix.mysql-version }} + env: + MYSQL_ROOT_HOST: '%' + MYSQL_USER: 'cycle' + MYSQL_PASSWORD: 'SSpaSS__1_123' + MYSQL_ROOT_PASSWORD: 'SSpaSS__1_123' + MYSQL_DATABASE: 'default' + options: >- + --health-cmd="mysqladmin ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 13306:3306 + + steps: + - name: ๐Ÿ“ฆ Check out the codebase + uses: actions/checkout@v4.1.6 + + - name: ๐Ÿ› ๏ธ Setup PHP + uses: shivammathur/setup-php@2.30.4 + with: + php-version: ${{ matrix.php-version }} + extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, pdo_sqlite + ini-values: error_reporting=E_ALL + coverage: none + + - name: ๐Ÿ› ๏ธ Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: ๐Ÿค– Validate composer.json and composer.lock + run: composer validate --ansi --strict + + - name: ๐Ÿ” Get composer cache directory + uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0 + + - name: โ™ป๏ธ Restore cached dependencies installed with composer + uses: actions/cache@v4.0.2 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }} + restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + + - name: ๐Ÿ—‘๏ธ Remove PHP platform configuration + if: "matrix.dependencies != 'locked'" + run: composer config platform.php --ansi --unset + + - name: ๐Ÿ“ฅ Install "${{ matrix.dependencies }}" dependencies + uses: wayofdev/gh-actions/actions/composer/install@v3.1.0 + with: + dependencies: ${{ matrix.dependencies }} + + - name: ๐Ÿงช Run phpunit tests with Pest + run: composer test diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 58d9575b..d6ff3af2 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,6 +1,6 @@ --- -name: ๐Ÿงช Unit testing +name: ๐Ÿงช Unit and mutation testing (SQLite) on: # yamllint disable-line rule:truthy pull_request: From 3bddb930318a5765ef34379324da222cbc6b0e3d Mon Sep 17 00:00:00 2001 From: lotyp Date: Sun, 26 May 2024 17:16:29 +0300 Subject: [PATCH 3/8] ci: fix database name --- .github/workflows/testing-mysql.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing-mysql.yml b/.github/workflows/testing-mysql.yml index 478f6634..14595cca 100644 --- a/.github/workflows/testing-mysql.yml +++ b/.github/workflows/testing-mysql.yml @@ -16,6 +16,7 @@ env: DB_USERNAME: cycle DB_PASSWORD: SSpaSS__1_123 DB_CONNECTION: mysql + DB_DATABASE: default jobs: test-mysql: From c48386e3acf0532df6f30937d5f26a7929a5d77c Mon Sep 17 00:00:00 2001 From: lotyp Date: Sun, 26 May 2024 17:28:09 +0300 Subject: [PATCH 4/8] ci: add testing against PostgreSQL --- .github/workflows/testing-mysql.yml | 4 +- .github/workflows/testing-pgsql.yml | 95 +++++++++++++++++++++++++++++ .github/workflows/testing.yml | 2 +- 3 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/testing-pgsql.yml diff --git a/.github/workflows/testing-mysql.yml b/.github/workflows/testing-mysql.yml index 14595cca..7c7b4078 100644 --- a/.github/workflows/testing-mysql.yml +++ b/.github/workflows/testing-mysql.yml @@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy branches: - master -name: ๐Ÿงช Unit testing (MySQL) +name: ๐Ÿงช Testing (MySQL) env: DB_HOST: 127.0.0.1 @@ -62,7 +62,7 @@ jobs: uses: shivammathur/setup-php@2.30.4 with: php-version: ${{ matrix.php-version }} - extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, pdo_sqlite + extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql ini-values: error_reporting=E_ALL coverage: none diff --git a/.github/workflows/testing-pgsql.yml b/.github/workflows/testing-pgsql.yml new file mode 100644 index 00000000..53f9d5c8 --- /dev/null +++ b/.github/workflows/testing-pgsql.yml @@ -0,0 +1,95 @@ +--- + +on: # yamllint disable-line rule:truthy + pull_request: + branches: + - master + push: + branches: + - master + +name: ๐Ÿงช Testing (PostgreSQL) + +env: + DB_HOST: 127.0.0.1 + DB_PORT: 15432 + DB_USERNAME: cycle + DB_PASSWORD: SSpaSS__1_123 + DB_CONNECTION: mysql + DB_DATABASE: default + +jobs: + test-mysql: + timeout-minutes: 4 + runs-on: ${{ matrix.os }} + concurrency: + cancel-in-progress: true + group: test-mysql-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }} + strategy: + fail-fast: true + matrix: + os: + - 'ubuntu-latest' + php-version: + - '8.2' + dependencies: + - locked + pgsql-version: + - '13-alpine' + + services: + mysql: + image: postgres:${{ matrix.pgsql-version }} + env: + POSTGRES_DB: 'default' + POSTGRES_USER: 'cycle' + POSTGRES_PASSWORD: 'SSpaSS__1_123' + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 15432:5432 + + steps: + - name: ๐Ÿ“ฆ Check out the codebase + uses: actions/checkout@v4.1.6 + + - name: ๐Ÿ› ๏ธ Setup PHP + uses: shivammathur/setup-php@2.30.4 + with: + php-version: ${{ matrix.php-version }} + extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, pdo_pgsql + ini-values: error_reporting=E_ALL + coverage: none + + - name: ๐Ÿ› ๏ธ Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: ๐Ÿค– Validate composer.json and composer.lock + run: composer validate --ansi --strict + + - name: ๐Ÿ” Get composer cache directory + uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0 + + - name: โ™ป๏ธ Restore cached dependencies installed with composer + uses: actions/cache@v4.0.2 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }} + restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + + - name: ๐Ÿ—‘๏ธ Remove PHP platform configuration + if: "matrix.dependencies != 'locked'" + run: composer config platform.php --ansi --unset + + - name: ๐Ÿ“ฅ Install "${{ matrix.dependencies }}" dependencies + uses: wayofdev/gh-actions/actions/composer/install@v3.1.0 + with: + dependencies: ${{ matrix.dependencies }} + + - name: ๐Ÿงช Run phpunit tests with Pest + run: composer test diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d6ff3af2..4337b570 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,6 +1,6 @@ --- -name: ๐Ÿงช Unit and mutation testing (SQLite) +name: ๐Ÿงช Testing (SQLite) on: # yamllint disable-line rule:truthy pull_request: From 51e30bf8014f195b315363a8317974e63c8009c3 Mon Sep 17 00:00:00 2001 From: lotyp Date: Sun, 26 May 2024 17:30:23 +0300 Subject: [PATCH 5/8] ci: fix typo in pgsql workflow --- .github/workflows/testing-pgsql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing-pgsql.yml b/.github/workflows/testing-pgsql.yml index 53f9d5c8..a2500c79 100644 --- a/.github/workflows/testing-pgsql.yml +++ b/.github/workflows/testing-pgsql.yml @@ -15,16 +15,16 @@ env: DB_PORT: 15432 DB_USERNAME: cycle DB_PASSWORD: SSpaSS__1_123 - DB_CONNECTION: mysql + DB_CONNECTION: pgsql DB_DATABASE: default jobs: - test-mysql: + test-pgsql: timeout-minutes: 4 runs-on: ${{ matrix.os }} concurrency: cancel-in-progress: true - group: test-mysql-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }} + group: test-pgsql-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }} strategy: fail-fast: true matrix: From 6d6b9c2b280af5f33cc2cd8e07ee2471b10c953d Mon Sep 17 00:00:00 2001 From: lotyp Date: Sun, 26 May 2024 17:52:18 +0300 Subject: [PATCH 6/8] ci: add test against sqlserver --- .github/workflows/testing-mssql.yml | 94 +++++++++++++++++++++++++++++ .github/workflows/testing-mysql.yml | 6 +- .github/workflows/testing-pgsql.yml | 4 +- 3 files changed, 99 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/testing-mssql.yml diff --git a/.github/workflows/testing-mssql.yml b/.github/workflows/testing-mssql.yml new file mode 100644 index 00000000..b3018308 --- /dev/null +++ b/.github/workflows/testing-mssql.yml @@ -0,0 +1,94 @@ +--- + +on: # yamllint disable-line rule:truthy + pull_request: + branches: + - master + push: + branches: + - master + +name: ๐Ÿงช Testing (MSSQL - SQLServer) + +env: + DB_HOST: 127.0.0.1 + DB_PORT: 11433 + DB_USERNAME: SA + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} + DB_CONNECTION: sqlserver + DB_DATABASE: tempdb + +jobs: + test-sqlserver: + timeout-minutes: 4 + runs-on: ${{ matrix.os }} + concurrency: + cancel-in-progress: true + group: test-sqlserver-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }} + strategy: + fail-fast: true + matrix: + os: + - 'ubuntu-latest' + php-version: + - '8.2' + dependencies: + - locked + sqlserver-version: + - '2022-latest' + + services: + sqlserver: + image: mcr.microsoft.com/mssql/server:${{ matrix.sqlserver-version }} + env: + ACCEPT_EULA: 'Y' + SA_PASSWORD: ${{ secrets.DB_PASSWORD }} + options: >- + --health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '${{ secrets.DB_PASSWORD }}' -l 30 -Q 'SELECT 1'" + --health-interval 3s + --health-timeout 1s + --health-retries 10 + ports: + - 11433:1433 + + steps: + - name: ๐Ÿ“ฆ Check out the codebase + uses: actions/checkout@v4.1.6 + + - name: ๐Ÿ› ๏ธ Setup PHP + uses: shivammathur/setup-php@2.30.4 + with: + php-version: ${{ matrix.php-version }} + extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, pdo_sqlsrv + ini-values: error_reporting=E_ALL + coverage: none + + - name: ๐Ÿ› ๏ธ Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: ๐Ÿค– Validate composer.json and composer.lock + run: composer validate --ansi --strict + + - name: ๐Ÿ” Get composer cache directory + uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0 + + - name: โ™ป๏ธ Restore cached dependencies installed with composer + uses: actions/cache@v4.0.2 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }} + restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + + - name: ๐Ÿ—‘๏ธ Remove PHP platform configuration + if: "matrix.dependencies != 'locked'" + run: composer config platform.php --ansi --unset + + - name: ๐Ÿ“ฅ Install "${{ matrix.dependencies }}" dependencies + uses: wayofdev/gh-actions/actions/composer/install@v3.1.0 + with: + dependencies: ${{ matrix.dependencies }} + + - name: ๐Ÿงช Run phpunit tests with Pest + run: composer test diff --git a/.github/workflows/testing-mysql.yml b/.github/workflows/testing-mysql.yml index 7c7b4078..5ef17d3c 100644 --- a/.github/workflows/testing-mysql.yml +++ b/.github/workflows/testing-mysql.yml @@ -14,7 +14,7 @@ env: DB_HOST: 127.0.0.1 DB_PORT: 13306 DB_USERNAME: cycle - DB_PASSWORD: SSpaSS__1_123 + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} DB_CONNECTION: mysql DB_DATABASE: default @@ -43,8 +43,8 @@ jobs: env: MYSQL_ROOT_HOST: '%' MYSQL_USER: 'cycle' - MYSQL_PASSWORD: 'SSpaSS__1_123' - MYSQL_ROOT_PASSWORD: 'SSpaSS__1_123' + MYSQL_PASSWORD: ${{ secrets.DB_PASSWORD }} + MYSQL_ROOT_PASSWORD: ${{ secrets.DB_PASSWORD }} MYSQL_DATABASE: 'default' options: >- --health-cmd="mysqladmin ping" diff --git a/.github/workflows/testing-pgsql.yml b/.github/workflows/testing-pgsql.yml index a2500c79..27160c78 100644 --- a/.github/workflows/testing-pgsql.yml +++ b/.github/workflows/testing-pgsql.yml @@ -14,7 +14,7 @@ env: DB_HOST: 127.0.0.1 DB_PORT: 15432 DB_USERNAME: cycle - DB_PASSWORD: SSpaSS__1_123 + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} DB_CONNECTION: pgsql DB_DATABASE: default @@ -43,7 +43,7 @@ jobs: env: POSTGRES_DB: 'default' POSTGRES_USER: 'cycle' - POSTGRES_PASSWORD: 'SSpaSS__1_123' + POSTGRES_PASSWORD: ${{ secrets.DB_PASSWORD }} options: >- --health-cmd pg_isready --health-interval 10s From c8eb0eda7fe68696f3df93b0fc36a0e0d2608eeb Mon Sep 17 00:00:00 2001 From: lotyp Date: Sun, 26 May 2024 17:59:03 +0300 Subject: [PATCH 7/8] ci: fix mssql --- .github/workflows/testing-mssql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing-mssql.yml b/.github/workflows/testing-mssql.yml index b3018308..dbdbc867 100644 --- a/.github/workflows/testing-mssql.yml +++ b/.github/workflows/testing-mssql.yml @@ -44,7 +44,7 @@ jobs: ACCEPT_EULA: 'Y' SA_PASSWORD: ${{ secrets.DB_PASSWORD }} options: >- - --health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '${{ secrets.DB_PASSWORD }}' -l 30 -Q 'SELECT 1'" + --health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '$SA_PASSWORD' -l 30 -Q 'SELECT 1'" --health-interval 3s --health-timeout 1s --health-retries 10 From 837213ddb09a1edb3d5adc6a764033ecf42281e9 Mon Sep 17 00:00:00 2001 From: lotyp Date: Sun, 26 May 2024 18:01:49 +0300 Subject: [PATCH 8/8] ci: fix mssql --- .github/workflows/testing-mssql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing-mssql.yml b/.github/workflows/testing-mssql.yml index dbdbc867..1eb5d122 100644 --- a/.github/workflows/testing-mssql.yml +++ b/.github/workflows/testing-mssql.yml @@ -14,7 +14,7 @@ env: DB_HOST: 127.0.0.1 DB_PORT: 11433 DB_USERNAME: SA - DB_PASSWORD: ${{ secrets.DB_PASSWORD }} + DB_PASSWORD: 'SSpaSS__1_123' DB_CONNECTION: sqlserver DB_DATABASE: tempdb @@ -42,9 +42,9 @@ jobs: image: mcr.microsoft.com/mssql/server:${{ matrix.sqlserver-version }} env: ACCEPT_EULA: 'Y' - SA_PASSWORD: ${{ secrets.DB_PASSWORD }} + SA_PASSWORD: 'SSpaSS__1_123' options: >- - --health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '$SA_PASSWORD' -l 30 -Q 'SELECT 1'" + --health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'SSpaSS__1_123' -l 30 -Q 'SELECT 1'" --health-interval 3s --health-timeout 1s --health-retries 10