File: phpunit-sqlite.yml

package info (click to toggle)
php-doctrine-dbal 4.4.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,476 kB
  • sloc: php: 65,801; xml: 618; makefile: 23
file content (63 lines) | stat: -rw-r--r-- 1,881 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: PHPUnit with SQLite

on:
  workflow_call:
    inputs:
      os:
        required: true
        type: string
      php-version:
        required: true
        type: string
      extension:
        required: true
        type: string
      dependency-versions:
        required: true
        type: string
      config-file-suffix:
        required: false
        type: string
        default: ''

jobs:
  phpunit-sqlite:
    runs-on: ${{ inputs.os }}

    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ inputs.php-version }}
          coverage: pcov
          ini-values: zend.assertions=1
        env:
          fail-fast: true

      - name: Install dependencies with Composer
        uses: ramsey/composer-install@v3
        with:
          composer-options: '--ignore-platform-req=php+'
          dependency-versions: ${{ inputs.dependency-versions }}

      - name: Print SQLite version
        run: >
          php -r 'printf("Testing with SQLite version %s\n", (new PDO("sqlite::memory:"))->query("select sqlite_version()")->fetch()[0]);'
        if: ${{ inputs.extension == 'pdo_sqlite' }}

      - name: Print SQLite version
        run: >
          php -r 'printf("Testing with SQLite version %s\n", SQLite3::version()["versionString"]);'
        if: ${{ inputs.extension == 'sqlite3' }}

      - name: Run PHPUnit
        run: vendor/bin/phpunit -c ci/github/phpunit/${{ inputs.extension }}${{ inputs.config-file-suffix }}.xml --coverage-clover=coverage.xml

      - name: Upload coverage file
        uses: actions/upload-artifact@v6
        with:
          name: ${{ github.job }}-php-${{ inputs.php-version }}-${{ inputs.extension }}${{ inputs.config-file-suffix }}-${{ inputs.dependency-versions }}.coverage
          path: coverage.xml