Skip to content

Commit cb90015

Browse files
authored
Use composer update for build
Because: 1. `composer create-project` doesn't fetch latest commit from master. 2. `composer create-project` doesn't work with branches.
1 parent 3f322e0 commit cb90015

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
- "8.0"
2525

2626
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2
29+
2730
- name: Install PHP with extensions
2831
uses: shivammathur/setup-php@v2
2932
with:
@@ -49,15 +52,14 @@ jobs:
4952
restore-keys: |
5053
php${{ matrix.php }}-composer-
5154
52-
- name: Install template yiisoft/app-api with composer create project php 7.4
55+
- name: Install dependencies with composer php 7.4
5356
if: matrix.php == '7.4'
54-
run: composer create-project --prefer-dist --no-interaction --no-progress --stability=dev yiisoft/app-api app --ansi
57+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
5558

56-
- name: Install template yiisoft/app-api with composer create project php 8.0
59+
- name: Install dependencies with composer php 8.0
5760
if: matrix.php == '8.0'
58-
run: composer create-project --prefer-dist --no-interaction --no-progress --ignore-platform-reqs --stability=dev yiisoft/app-api app --ansi
61+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ignore-platform-reqs --ansi
5962

6063
- name: Run tests with codeception
6164
run: |
62-
cd app
6365
php -S 127.0.0.1:8080 -t public public/index-test.php > ./runtime/yii.log 2>&1 & vendor/bin/codecept run acceptance --env github-ci

0 commit comments

Comments
 (0)