Repository navigation
105 lines (88 loc) · 2.58 KB
/
Copy pathpgsql.yml
File metadata and controls
105 lines (88 loc) · 2.58 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: pgsql
on:
pull_request:
paths: &paths
- 'src/**'
- 'sql/**'
- 'tests/**'
- 'composer.json'
- 'phpunit.xml.dist'
- '.github/workflows/pgsql.yml'
push:
branches: ['master']
paths: *paths
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: PHP ${{ matrix.php }}-pgsql-${{ matrix.pgsql }}
env:
extensions: pdo, pdo_pgsql
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
php:
- 8.5
pgsql:
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- latest
include:
- php: 8.1
pgsql: latest
- php: 8.2
pgsql: latest
- php: 8.3
pgsql: latest
- php: 8.4
pgsql: latest
services:
postgres:
image: postgres:${{ matrix.pgsql }} # zizmor: ignore[unpinned-images]
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: yiitest
ports:
- 5432:5432
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout.
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install PHP with extensions.
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: date.timezone='UTC'
coverage: pcov
tools: composer:v2
- name: Update composer.
run: composer self-update
- uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
composer-options: "--prefer-dist --no-interaction --no-progress --ansi"
- name: Install db-pgsql.
run: composer require yiisoft/db-pgsql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Run tests with phpunit.
run: vendor/bin/phpunit --testsuite=Pgsql --coverage-clover=coverage.xml --colors=always
- name: Upload coverage to Codecov.
if: matrix.php == '8.5'
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml