Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project #9

Merged
merged 9 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ BUILD_ROOT_PATH=/app/
PROJECT_NAME=me_library

PHP_BUILD_VERSION=7.4
PHP_TEST_VERSION=8.2
PHP_TEST_VERSION=8.3
XDEBUG_VERSION=3.3.2

HOST_IP_ADDRESS=host-gateway


59 changes: 38 additions & 21 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Continuous Integration
on: [push]
on:
- push
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -10,32 +11,48 @@ jobs:
- '8.0'
- '8.1'
- '8.2'
- '8.3'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Analysing source code
run: find ./src/ ./inc/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l
- name: Analysing source code
run: find ./src/ ./inc/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l

- name: Validate composer.json and composer.lock
run: composer validate
- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
uses: ramsey/composer-install@v1
with:
dependency-versions: highest
composer-options: "--prefer-dist"
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: PHPUnit
run: ./vendor/bin/phpunit
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Psalm
run: ./vendor/bin/psalm --show-info=false --threads=8 --diff
- name: Set up env config
run: cp .env.example .env

- name: PHPCS
run: ./vendor/bin/phpcs -s --report-source --runtime-set ignore_warnings_on_exit 1
- name: Install dependencies
uses: ramsey/composer-install@v1
with:
dependency-versions: highest
composer-options: "--prefer-dist"

- name: PHPUnit
run: ./vendor/bin/phpunit

- name: Psalm
run: ./vendor/bin/psalm --show-info=false --threads=8 --diff

- name: PHPCS
run: ./vendor/bin/phpcs -s --report-source --runtime-set ignore_warnings_on_exit 1
8 changes: 4 additions & 4 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [[*next-version*]] - YYYY-MM-DD
### Changed
- PHP default version is now 8.3. Building up to that (#9).

### Added
- Composer vendor dir caching caching (#9).
- xDebug version now an `.env` var (#9).
- `.env.example` copied to `.env` on CI (#9).

### Fixed
- Warning about PHPUnit config not being in up-to-date format (#9).

## [0.1.2-alpha1] - 2023-03-10
### Fixed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Use this project as a starter for your PHP library!

- **Continuous Integration** - Automatically verify that all contributions comply with
project standards with [GitHub Actions][].
- **Composer `vendor` caching**. Blazing-fast install.

### Usage

Expand Down
Loading
Loading