Skip to content

Commit 2fbe98d

Browse files
authored
Merge pull request #215 from kenjis/update-ci-442
Update to CI 4.4.2
2 parents 83c2cf9 + 2e5ff62 commit 2fbe98d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1434
-1857
lines changed

.github/workflows/deptrac.yml

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,5 @@ on:
1919
- '.github/workflows/deptrac.yml'
2020

2121
jobs:
22-
build:
23-
name: Dependency Tracing
24-
runs-on: ubuntu-latest
25-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
26-
27-
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
30-
31-
- name: Set up PHP
32-
uses: shivammathur/setup-php@v2
33-
with:
34-
php-version: '8.0'
35-
tools: phive
36-
extensions: intl, json, mbstring, xml
37-
coverage: none
38-
env:
39-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
41-
- name: Get composer cache directory
42-
id: composer-cache
43-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
44-
45-
- name: Cache composer dependencies
46-
uses: actions/cache@v3
47-
with:
48-
path: ${{ steps.composer-cache.outputs.dir }}
49-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
50-
restore-keys: ${{ runner.os }}-composer-
51-
52-
- name: Create Deptrac cache directory
53-
run: mkdir -p build/
54-
55-
- name: Cache Deptrac results
56-
uses: actions/cache@v3
57-
with:
58-
path: build
59-
key: ${{ runner.os }}-deptrac-${{ github.sha }}
60-
restore-keys: ${{ runner.os }}-deptrac-
61-
62-
- name: Install dependencies
63-
run: |
64-
if [ -f composer.lock ]; then
65-
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
66-
else
67-
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
68-
fi
69-
70-
- name: Trace dependencies
71-
run: |
72-
sudo phive --no-progress install --global --trust-gpg-keys B8F640134AB1782E,A98E898BB53EB748 qossmic/deptrac
73-
deptrac analyze --cache-file=build/deptrac.cache
22+
deptrac:
23+
uses: codeigniter4/.github/.github/workflows/deptrac.yml@main

.github/workflows/infection.yml

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -9,64 +9,7 @@ on:
99
- 'composer.*'
1010
- 'phpunit*'
1111
- '.github/workflows/infection.yml'
12-
push:
13-
branches:
14-
- develop
15-
paths:
16-
- '**.php'
17-
- 'composer.*'
18-
- 'phpunit*'
19-
- '.github/workflows/infection.yml'
2012

2113
jobs:
22-
main:
23-
name: Mutation Testing
24-
runs-on: ubuntu-latest
25-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
26-
27-
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
30-
31-
- name: Set up PHP
32-
uses: shivammathur/setup-php@v2
33-
with:
34-
php-version: '8.0'
35-
tools: infection, phpunit
36-
extensions: intl, json, mbstring, gd, xml, sqlite3
37-
coverage: xdebug
38-
env:
39-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
41-
- name: Set up problem matchers for PHPUnit
42-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
43-
44-
- name: Configure matchers
45-
uses: mheap/phpunit-matcher-action@v1
46-
47-
- name: Get composer cache directory
48-
id: composer-cache
49-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
50-
51-
- name: Cache composer dependencies
52-
uses: actions/cache@v3
53-
with:
54-
path: ${{ steps.composer-cache.outputs.dir }}
55-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
56-
restore-keys: ${{ runner.os }}-composer-
57-
58-
- name: Install dependencies
59-
run: |
60-
if [ -f composer.lock ]; then
61-
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
62-
else
63-
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
64-
fi
65-
66-
- name: Test with PHPUnit
67-
run: vendor/bin/phpunit --teamcity
68-
69-
- name: Mutate with Infection
70-
run: |
71-
git fetch --depth=1 origin $GITHUB_BASE_REF
72-
infection --threads=2 --skip-initial-tests --coverage=build/phpunit --git-diff-base=origin/$GITHUB_BASE_REF --git-diff-filter=AM --logger-github --ignore-msi-with-no-mutations
14+
infection:
15+
uses: codeigniter4/.github/.github/workflows/infection.yml@main

.github/workflows/phpcpd.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,7 @@ on:
1515
- '.github/workflows/phpcpd.yml'
1616

1717
jobs:
18-
build:
19-
name: Code Copy-Paste Detection
20-
runs-on: ubuntu-latest
21-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
22-
23-
steps:
24-
- name: Checkout
25-
uses: actions/checkout@v4
26-
27-
- name: Setup PHP
28-
uses: shivammathur/setup-php@v2
29-
with:
30-
php-version: '8.0'
31-
tools: phpcpd
32-
extensions: dom, mbstring
33-
coverage: none
34-
35-
- name: Detect duplicate code
36-
run: phpcpd app/ tests/
18+
phpcpd:
19+
uses: codeigniter4/.github/.github/workflows/phpcpd.yml@main
20+
with:
21+
dirs: "src/ tests/"

.github/workflows/phpcsfixer.yml

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,5 @@ on:
1515
- '.github/workflows/phpcsfixer.yml'
1616

1717
jobs:
18-
build:
19-
name: PHP ${{ matrix.php-versions }} Coding Standards
20-
runs-on: ubuntu-latest
21-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
22-
strategy:
23-
fail-fast: false
24-
matrix:
25-
php-versions: ['7.4', '8.0', '8.1']
26-
27-
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
30-
31-
- name: Set up PHP
32-
uses: shivammathur/setup-php@v2
33-
with:
34-
php-version: ${{ matrix.php-versions }}
35-
extensions: json, tokenizer
36-
coverage: none
37-
env:
38-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
40-
- name: Get composer cache directory
41-
id: composer-cache
42-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
43-
44-
- name: Cache composer dependencies
45-
uses: actions/cache@v3
46-
with:
47-
path: ${{ steps.composer-cache.outputs.dir }}
48-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
49-
restore-keys: ${{ runner.os }}-composer-
50-
51-
- name: Install dependencies
52-
run: |
53-
if [ -f composer.lock ]; then
54-
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
55-
else
56-
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
57-
fi
58-
59-
- name: Check code for standards compliance
60-
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff
18+
phpcsfixer:
19+
uses: codeigniter4/.github/.github/workflows/phpcsfixer.yml@main

.github/workflows/phpstan.yml

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -19,57 +19,5 @@ on:
1919
- '.github/workflows/phpstan.yml'
2020

2121
jobs:
22-
build:
23-
name: PHP ${{ matrix.php-versions }} Static Analysis
24-
runs-on: ubuntu-latest
25-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
26-
strategy:
27-
fail-fast: false
28-
matrix:
29-
php-versions: ['7.4', '8.0', '8.1']
30-
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v4
34-
35-
- name: Setup PHP
36-
uses: shivammathur/setup-php@v2
37-
with:
38-
php-version: ${{ matrix.php-versions }}
39-
tools: phpstan, phpunit
40-
extensions: intl, json, mbstring, xml
41-
coverage: none
42-
env:
43-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
45-
- name: Get composer cache directory
46-
id: composer-cache
47-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
48-
49-
- name: Cache composer dependencies
50-
uses: actions/cache@v3
51-
with:
52-
path: ${{ steps.composer-cache.outputs.dir }}
53-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
54-
restore-keys: ${{ runner.os }}-composer-
55-
56-
- name: Create PHPStan cache directory
57-
run: mkdir -p build/phpstan
58-
59-
- name: Cache PHPStan results
60-
uses: actions/cache@v3
61-
with:
62-
path: build/phpstan
63-
key: ${{ runner.os }}-phpstan-${{ github.sha }}
64-
restore-keys: ${{ runner.os }}-phpstan-
65-
66-
- name: Install dependencies
67-
run: |
68-
if [ -f composer.lock ]; then
69-
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
70-
else
71-
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
72-
fi
73-
74-
- name: Run static analysis
75-
run: vendor/bin/phpstan analyze
22+
phpstan:
23+
uses: codeigniter4/.github/.github/workflows/phpstan.yml@main

.github/workflows/phpunit.yml

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -19,72 +19,5 @@ on:
1919
- '.github/workflows/phpunit.yml'
2020

2121
jobs:
22-
main:
23-
name: PHP ${{ matrix.php-versions }} Unit Tests
24-
runs-on: ubuntu-latest
25-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
26-
strategy:
27-
matrix:
28-
php-versions: ['7.4', '8.0', '8.1']
29-
30-
steps:
31-
- name: Checkout
32-
uses: actions/checkout@v4
33-
34-
- name: Set up PHP
35-
uses: shivammathur/setup-php@v2
36-
with:
37-
php-version: ${{ matrix.php-versions }}
38-
tools: composer, phive, phpunit
39-
extensions: intl, json, mbstring, gd, xdebug, xml, sqlite3
40-
coverage: xdebug
41-
env:
42-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
44-
- name: Get composer cache directory
45-
id: composer-cache
46-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
47-
48-
- name: Cache composer dependencies
49-
uses: actions/cache@v3
50-
with:
51-
path: ${{ steps.composer-cache.outputs.dir }}
52-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
53-
restore-keys: ${{ runner.os }}-composer-
54-
55-
- name: Install dependencies
56-
run: |
57-
if [ -f composer.lock ]; then
58-
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
59-
else
60-
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
61-
fi
62-
63-
- name: Test with PHPUnit
64-
run: vendor/bin/phpunit --verbose --coverage-text
65-
env:
66-
TERM: xterm-256color
67-
TACHYCARDIA_MONITOR_GA: enabled
68-
69-
- if: matrix.php-versions == '8.0'
70-
name: Run Coveralls
71-
continue-on-error: true
72-
run: |
73-
sudo phive --no-progress install --global --trust-gpg-keys E82B2FB314E9906E php-coveralls
74-
php-coveralls --verbose --coverage_clover=build/phpunit/clover.xml --json_path build/phpunit/coveralls-upload.json
75-
env:
76-
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77-
COVERALLS_PARALLEL: true
78-
COVERALLS_FLAG_NAME: PHP ${{ matrix.php-versions }}
79-
80-
coveralls:
81-
needs: [main]
82-
name: Coveralls Finished
83-
runs-on: ubuntu-latest
84-
steps:
85-
- name: Upload Coveralls results
86-
uses: coverallsapp/github-action@master
87-
continue-on-error: true
88-
with:
89-
github-token: ${{ secrets.GITHUB_TOKEN }}
90-
parallel-finished: true
22+
phpunit:
23+
uses: codeigniter4/.github/.github/workflows/phpunit.yml@main

.github/workflows/psalm.yml

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,53 +19,5 @@ on:
1919
- '.github/workflows/psalm.yml'
2020

2121
jobs:
22-
build:
23-
name: Psalm Analysis
24-
runs-on: ubuntu-latest
25-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
26-
27-
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
30-
31-
- name: Setup PHP
32-
uses: shivammathur/setup-php@v2
33-
with:
34-
php-version: '8.0'
35-
tools: phpstan, phpunit
36-
extensions: intl, json, mbstring, xml
37-
coverage: none
38-
env:
39-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
41-
- name: Get composer cache directory
42-
id: composer-cache
43-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
44-
45-
- name: Cache composer dependencies
46-
uses: actions/cache@v3
47-
with:
48-
path: ${{ steps.composer-cache.outputs.dir }}
49-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
50-
restore-keys: ${{ runner.os }}-composer-
51-
52-
- name: Create Psalm cache directory
53-
run: mkdir -p build/psalm
54-
55-
- name: Cache Psalm results
56-
uses: actions/cache@v3
57-
with:
58-
path: build/psalm
59-
key: ${{ runner.os }}-psalm-${{ github.sha }}
60-
restore-keys: ${{ runner.os }}-psalm-
61-
62-
- name: Install dependencies
63-
run: |
64-
if [ -f composer.lock ]; then
65-
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
66-
else
67-
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
68-
fi
69-
70-
- name: Run Psalm analysis
71-
run: vendor/bin/psalm
22+
psalm:
23+
uses: codeigniter4/.github/.github/workflows/psalm.yml@main

0 commit comments

Comments
 (0)