Skip to content

Commit f7b3889

Browse files
committed
Dedicated action for installation of composer packages
1 parent 93f659e commit f7b3889

File tree

1 file changed

+39
-59
lines changed

1 file changed

+39
-59
lines changed

.github/workflows/ci.yaml

Lines changed: 39 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,12 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v5
2020

21-
- name: Setup PHP Action
22-
uses: shivammathur/setup-php@v2
23-
with:
24-
php-version: ${{ matrix.php }}
25-
coverage: none
26-
extensions: 'pdo_sqlite, gd'
27-
tools: cs2pr
28-
29-
- uses: ramsey/composer-install@v3
21+
- uses: ibexa/gh-workflows/actions/composer-install@main
3022
with:
31-
dependency-versions: "highest"
23+
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
24+
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
25+
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
26+
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
3227

3328
- name: Run code style check
3429
run: composer run-script check-cs -- --format=checkstyle | cs2pr
@@ -49,17 +44,12 @@ jobs:
4944
steps:
5045
- uses: actions/checkout@v5
5146

52-
- name: Setup PHP Action
53-
uses: shivammathur/setup-php@v2
54-
with:
55-
php-version: ${{ matrix.php }}
56-
coverage: none
57-
extensions: pdo_sqlite, gd
58-
tools: cs2pr
59-
60-
- uses: ramsey/composer-install@v3
47+
- uses: ibexa/gh-workflows/actions/composer-install@main
6148
with:
62-
dependency-versions: "highest"
49+
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
50+
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
51+
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
52+
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
6353

6454
- name: Setup problem matchers for PHPUnit
6555
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
@@ -105,29 +95,24 @@ jobs:
10595
- 'postgres:18'
10696

10797
steps:
108-
- uses: actions/checkout@v2
109-
110-
- name: Setup PHP Action
111-
uses: shivammathur/setup-php@v2
112-
with:
113-
php-version: ${{ matrix.php }}
114-
coverage: none
115-
extensions: pdo_pgsql, gd
116-
tools: cs2pr
98+
- uses: actions/checkout@v5
11799

118-
- uses: "ramsey/composer-install@v1"
119-
with:
120-
dependency-versions: "highest"
100+
- uses: ibexa/gh-workflows/actions/composer-install@main
101+
with:
102+
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
103+
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
104+
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
105+
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
121106

122-
- name: Setup problem matchers for PHPUnit
123-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
107+
- name: Setup problem matchers for PHPUnit
108+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
124109

125-
- name: Run integration test suite vs Postgresql
126-
run: composer run-script integration
127-
env:
128-
DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10"
129-
# Required by old repository tests
130-
DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb"
110+
- name: Run integration test suite vs Postgresql
111+
run: composer run-script integration
112+
env:
113+
DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10"
114+
# Required by old repository tests
115+
DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb"
131116

132117
integration-tests-mysql:
133118
name: MySQL integration tests
@@ -163,28 +148,23 @@ jobs:
163148
- 'mysql:8.4'
164149

165150
steps:
166-
- uses: actions/checkout@v5
167-
168-
- name: Setup PHP Action
169-
uses: shivammathur/setup-php@v2
170-
with:
171-
php-version: ${{ matrix.php }}
172-
coverage: none
173-
extensions: pdo_mysql, gd, redis
174-
tools: cs2pr
151+
- uses: actions/checkout@v5
175152

176-
- uses: ramsey/composer-install@v3
177-
with:
178-
dependency-versions: "highest"
153+
- uses: ibexa/gh-workflows/actions/composer-install@main
154+
with:
155+
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
156+
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
157+
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
158+
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
179159

180-
- name: Setup problem matchers for PHPUnit
181-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
160+
- name: Setup problem matchers for PHPUnit
161+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
182162

183-
- name: Run integration test suite vs MySQL
184-
run: composer run-script integration
185-
env:
186-
DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb"
187-
DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb"
163+
- name: Run integration test suite vs MySQL
164+
run: composer run-script integration
165+
env:
166+
DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb"
167+
DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb"
188168

189169
solr-integration:
190170
name: "Solr integration tests"

0 commit comments

Comments
 (0)