Skip to content

Commit 424295a

Browse files
committed
Split CI
1 parent 8c09980 commit 424295a

File tree

4 files changed

+175
-95
lines changed

4 files changed

+175
-95
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'CI - ComposerRequireChecker'
2+
on:
3+
workflow_run:
4+
workflows: ["CI"]
5+
types:
6+
- requested
7+
8+
concurrency:
9+
group: "CI-${{ github.head_ref }}"
10+
cancel-in-progress: true
11+
12+
env:
13+
# Cache params
14+
CACHE_VERSION: 2022061906 # To be able to create a new cache (YYYYMMDDXX)
15+
16+
jobs:
17+
check:
18+
name: ComposerRequireChecker
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
php-version:
23+
- '8.1' # Latest supported
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Setup PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php-version }}
31+
tools: composer
32+
coverage: none
33+
env:
34+
# Always use latest available patch for the version
35+
update: true
36+
37+
- name: Setup cache
38+
id: cache
39+
uses: actions/cache@v2
40+
with:
41+
path: |
42+
~/.composer
43+
# Clear the cache if composer json (as composer.lock is in the repo) has been updated
44+
key: ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ hashFiles('composer.json') }}
45+
46+
- name: Build
47+
run: make build
48+
49+
- name: ComposerRequireChecker
50+
uses: docker://webfactory/composer-require-checker:3.2.0

.github/workflows/CI-DepsChecker.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'CI - Dependencies check'
2+
on:
3+
workflow_run:
4+
workflows: ["CI"]
5+
types:
6+
- requested
7+
8+
concurrency:
9+
group: "CI-${{ github.head_ref }}"
10+
cancel-in-progress: true
11+
12+
env:
13+
# Cache params
14+
CACHE_VERSION: 2022061906 # To be able to create a new cache (YYYYMMDDXX)
15+
16+
jobs:
17+
check:
18+
name: Dependencies check
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
php-version:
23+
- '8.1' # Latest supported
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Setup PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php-version }}
31+
tools: composer
32+
coverage: none
33+
env:
34+
# Always use latest available patch for the version
35+
update: true
36+
37+
- name: Setup cache
38+
id: cache
39+
uses: actions/cache@v2
40+
with:
41+
path: |
42+
~/.composer
43+
# Clear the cache if composer json (as composer.lock is in the repo) has been updated
44+
key: ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ hashFiles('composer.json') }}
45+
46+
- name: Build
47+
run: make build
48+
49+
- name: Dependencies check
50+
uses: actions/dependency-review-action@v1

.github/workflows/CI-nightly.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: 'CI - Nightly'
2+
on:
3+
workflow_run:
4+
workflows: ["CI"]
5+
types:
6+
- completed
7+
8+
concurrency:
9+
group: "CI-${{ github.head_ref }}"
10+
cancel-in-progress: true
11+
12+
env:
13+
# Cache params
14+
CACHE_VERSION: 2022061906 # To be able to create a new cache (YYYYMMDDXX)
15+
TEST_OUTPUT_STYLE: pretty
16+
COMPOSER_OPTIONS: --optimize-autoloader --ignore-platform-req=php+
17+
18+
jobs:
19+
tests:
20+
name: Nightly - Symfony ${{ matrix.symfony-version }}
21+
needs: [ static-tests, tests ]
22+
runs-on: ubuntu-latest
23+
strategy:
24+
fail-fast: false
25+
max-parallel: 4
26+
# Perform tests against:
27+
# - current php dev version with all supported symfony version
28+
# - next Symfony minor version to manage with latest supported php version
29+
matrix:
30+
php-version:
31+
- '8.2' # Current php dev version
32+
symfony-version:
33+
- '4.4' # Lowest LTS
34+
- '5.4' # Latest LTS
35+
include:
36+
- symfony-version: '6.0' # Next symfony minor version to manage with latest supported PHP version
37+
php-version: '8.1'
38+
39+
steps:
40+
- name: Check out code
41+
uses: actions/checkout@v2
42+
43+
- name: Setup PHP
44+
uses: shivammathur/setup-php@v2
45+
with:
46+
php-version: '${{ matrix.php-version }}'
47+
tools: composer
48+
coverage: none
49+
env:
50+
# Always use latest available patch for the version
51+
update: true
52+
53+
- name: Setup cache
54+
id: cache
55+
uses: actions/cache@v2
56+
with:
57+
path: |
58+
~/.composer
59+
./vendor
60+
# Clear the cache if composer json (as composer.lock is in the repo) has been updated
61+
key: ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
62+
63+
- name: Build
64+
run: |
65+
composer require -W ${{ env.COMPOSER_OPTIONS }} \
66+
symfony/http-foundation:^${{ matrix.symfony-version }} \
67+
symfony/http-kernel:^${{ matrix.symfony-version }} \
68+
symfony/config:^${{ matrix.symfony-version }} \
69+
symfony/dependency-injection:^${{ matrix.symfony-version }} \
70+
symfony/event-dispatcher:^${{ matrix.symfony-version }} \
71+
symfony/routing:^${{ matrix.symfony-version }} \
72+
&& make build
73+
74+
- name: Test
75+
run: make test-unit && make test-functional

.github/workflows/CI.yml

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,6 @@ env:
2323
CODACY_BIN: ~/.cache/codacy/codacy.sh
2424

2525
jobs:
26-
static-tests:
27-
name: Static tests
28-
runs-on: ubuntu-latest
29-
steps:
30-
- uses: actions/checkout@v2
31-
32-
- name: Setup PHP
33-
uses: shivammathur/setup-php@v2
34-
with:
35-
php-version: '8.1'
36-
tools: composer
37-
coverage: none
38-
env:
39-
# Always use latest available patch for the version
40-
update: true
41-
42-
- name: Setup cache
43-
id: cache
44-
uses: actions/cache@v2
45-
with:
46-
path: |
47-
~/.composer
48-
./vendor
49-
# Clear the cache if composer json (as composer.lock is in the repo) has been updated
50-
key: ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
51-
52-
- name: Build
53-
run: make build
54-
55-
- name: ComposerRequireChecker
56-
uses: docker://webfactory/composer-require-checker:3.2.0
57-
58-
- name: Dependency Review
59-
uses: actions/dependency-review-action@v1
60-
6126
tests:
6227
name: UTs & FTs - Symfony ${{ matrix.symfony-version }}
6328
runs-on: ubuntu-latest
@@ -181,63 +146,3 @@ jobs:
181146
182147
- name: Finalize reporting
183148
run: ${{ env.CODACY_BIN }} final -t ${{ secrets.CODACY_PROJECT_TOKEN }}
184-
185-
# Perform tests against current php dev version and next Symfony minor version to manage
186-
nightly-tests:
187-
name: Nightly - Symfony ${{ matrix.symfony-version }}
188-
needs: [ static-tests, tests ]
189-
runs-on: ubuntu-latest
190-
env:
191-
COMPOSER_OPTIONS: '--optimize-autoloader --ignore-platform-req=php+'
192-
strategy:
193-
fail-fast: false
194-
max-parallel: 4
195-
matrix:
196-
php-version:
197-
- '8.2' # Current php dev version
198-
symfony-version:
199-
- '4.4' # Lowest LTS
200-
- '5.4' # Latest LTS
201-
include:
202-
- symfony-version: '6.0' # Next symfony minor version to manage with latest supported PHP version
203-
php-version: '8.1'
204-
205-
steps:
206-
- name: Check out code
207-
uses: actions/checkout@v2
208-
209-
- name: Setup PHP
210-
uses: shivammathur/setup-php@v2
211-
with:
212-
php-version: '${{ matrix.php-version }}'
213-
tools: composer
214-
coverage: none
215-
env:
216-
# Always use latest available patch for the version
217-
update: true
218-
219-
- name: Setup cache
220-
id: cache
221-
uses: actions/cache@v2
222-
with:
223-
path: |
224-
~/.composer
225-
./vendor
226-
${{ env.CODACY_CACHE_PATH }}
227-
build/behat-code-coverage-cache
228-
# Clear the cache if composer json (as composer.lock is in the repo) has been updated
229-
key: ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
230-
231-
- name: Build
232-
run: |
233-
composer require -W ${COMPOSER_OPTIONS} \
234-
symfony/http-foundation:^${{ matrix.symfony-version }} \
235-
symfony/http-kernel:^${{ matrix.symfony-version }} \
236-
symfony/config:^${{ matrix.symfony-version }} \
237-
symfony/dependency-injection:^${{ matrix.symfony-version }} \
238-
symfony/event-dispatcher:^${{ matrix.symfony-version }} \
239-
symfony/routing:^${{ matrix.symfony-version }} \
240-
&& make build
241-
242-
- name: Test
243-
run: make test-unit && make test-functional

0 commit comments

Comments
 (0)