mirror of
https://github.com/yiisoft/yii2.git
synced 2026-02-20 00:32:19 +01:00
79 lines
2.8 KiB
YAML
79 lines
2.8 KiB
YAML
name: ci-mssql
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
on:
|
|
pull_request: &ignore-paths
|
|
paths-ignore:
|
|
- ".appveyor.yml"
|
|
- ".dockerignore"
|
|
- ".editorconfig"
|
|
- ".git-blame-ignore-revs"
|
|
- ".gitattributes"
|
|
- ".github/CONTRIBUTING.md"
|
|
- ".github/FUNDING.yml"
|
|
- ".github/ISSUE_TEMPLATE.md"
|
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
- ".github/SECURITY.md"
|
|
- ".gitignore"
|
|
- ".gitlab-ci.yml"
|
|
- "code-of-conduct.md"
|
|
- "docs/**"
|
|
- "framework/.gitignore"
|
|
- "framework/.phpstorm.meta.php"
|
|
- "framework/CHANGELOG.md"
|
|
- "framework/LICENSE.md"
|
|
- "framework/README.md"
|
|
- "framework/UPGRADE.md"
|
|
- "eslint.config.js"
|
|
- "LICENSE.md"
|
|
- "README.md"
|
|
- "ROADMAP.md"
|
|
|
|
push: *ignore-paths
|
|
|
|
jobs:
|
|
tests:
|
|
name: MSSQL tests with coverage
|
|
uses: yiisoft/yii2-actions/.github/workflows/database.yml@master
|
|
with:
|
|
concurrency-group: mssql-${{ github.ref }}
|
|
coverage-driver: xdebug
|
|
database-env: '{"SA_PASSWORD":"YourStrong!Passw0rd","ACCEPT_EULA":"Y","MSSQL_PID":"Developer"}'
|
|
database-health-cmd: /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'
|
|
database-image: mcr.microsoft.com/mssql/server
|
|
database-port: "1433"
|
|
database-type: mssql
|
|
database-versions: '["2019-latest","2022-latest"]'
|
|
extensions: curl, intl, pdo, pdo_sqlsrv
|
|
hook: |
|
|
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
|
|
docker exec -i database /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q "IF DB_ID(N'yiitest') IS NULL CREATE DATABASE yiitest;"
|
|
os: '["ubuntu-latest"]'
|
|
php-version: '["7.4","8.5"]'
|
|
phpunit-group: mssql
|
|
secrets:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
tests-dev:
|
|
name: MSSQL tests
|
|
uses: yiisoft/yii2-actions/.github/workflows/database.yml@master
|
|
with:
|
|
concurrency-group: mssql-dev-${{ github.ref }}
|
|
coverage-driver: none
|
|
database-env: '{"SA_PASSWORD":"YourStrong!Passw0rd","ACCEPT_EULA":"Y","MSSQL_PID":"Developer"}'
|
|
database-health-cmd: /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'
|
|
database-image: mcr.microsoft.com/mssql/server
|
|
database-port: "1433"
|
|
database-type: mssql
|
|
database-versions: '["2022-latest"]'
|
|
extensions: curl, intl, pdo, pdo_sqlsrv
|
|
hook: |
|
|
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
|
|
docker exec -i database /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q "IF DB_ID(N'yiitest') IS NULL CREATE DATABASE yiitest;"
|
|
os: '["ubuntu-latest"]'
|
|
php-version: '["8.0","8.1","8.2","8.3","8.4"]'
|
|
phpunit-group: mssql
|