|
| 1 | +name: mssql |
| 2 | + |
1 | 3 | on: |
2 | 4 | pull_request: |
3 | 5 | paths-ignore: |
|
20 | 22 | - 'infection.json.dist' |
21 | 23 | - 'psalm.xml' |
22 | 24 |
|
23 | | -name: mssql |
24 | | - |
25 | 25 | permissions: |
26 | 26 | contents: read |
27 | 27 |
|
@@ -82,44 +82,42 @@ jobs: |
82 | 82 | options: --name=mssql --health-cmd="/opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 |
83 | 83 |
|
84 | 84 | steps: |
85 | | - - name: Checkout. |
86 | | - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd |
| 85 | + - name: Checkout |
| 86 | + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
87 | 87 | with: |
88 | 88 | persist-credentials: false |
89 | 89 |
|
90 | | - - name: Install ODBC driver. |
| 90 | + - name: Install ODBC driver |
91 | 91 | run: | |
92 | 92 | sudo curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list |
93 | 93 | sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 |
94 | 94 |
|
95 | 95 | - name: Create MS SQL Database. |
96 | 96 | run: docker exec -i mssql /opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest' |
97 | 97 |
|
98 | | - - name: Install PHP with extensions. |
99 | | - uses: shivammathur/setup-php@b604ade2a87db23f8871b7182e69ec5e75effb45 |
| 98 | + - name: Install PHP with extensions |
| 99 | + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 |
100 | 100 | with: |
101 | 101 | php-version: ${{ matrix.php }} |
102 | 102 | extensions: ${{ env.extensions }} |
103 | 103 | ini-values: date.timezone='UTC' |
104 | 104 | coverage: pcov |
105 | 105 | tools: composer:v2, pecl |
106 | 106 |
|
107 | | - - name: Update composer. |
108 | | - run: composer self-update |
109 | | - |
110 | | - - uses: "ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f" |
| 107 | + - name: Install Composer dependencies |
| 108 | + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 |
111 | 109 | with: |
112 | 110 | composer-options: "--prefer-dist --no-interaction --no-progress --ansi" |
113 | 111 |
|
114 | | - - name: Install db-mssql. |
| 112 | + - name: Install db-mssql |
115 | 113 | run: composer require yiisoft/db-mssql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi |
116 | 114 |
|
117 | | - - name: Run tests with phpunit. |
| 115 | + - name: Run tests with phpunit |
118 | 116 | run: vendor/bin/phpunit --testsuite=Mssql --coverage-clover=coverage.xml --colors=always |
119 | 117 |
|
120 | | - - name: Upload coverage to Codecov. |
| 118 | + - name: Upload coverage to Codecov |
121 | 119 | if: matrix.php == '8.4' |
122 | | - uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 |
| 120 | + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 |
123 | 121 | with: |
124 | 122 | token: ${{ secrets.CODECOV_TOKEN }} |
125 | 123 | files: ./coverage.xml |
0 commit comments