This repository has been archived by the owner on Jun 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add workflow ci * Update ci * Fix ci file * Update ci and composer.json * Change update phpunit Co-authored-by: stanislav.shupilkin <stanislav.shupilkin@lamoda.ru>
- Loading branch information
Showing
2 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: PHP Composer | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Build for ${{ matrix.php-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-version: [7.1, 7.2, 7.3, 7.4, 8.0] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Update phpunit | ||
if: startsWith(matrix.php, '7.1') | ||
run: | | ||
composer update --prefer-lowest | ||
- name: Run test suite | ||
run: vendor/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters