Skip to content

Commit

Permalink
Tweak CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmccreary committed Feb 17, 2024
1 parent 51effbf commit 56ccee9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build
on:
push:
branches:
- master
- master
pull_request:
schedule:
- cron: "0 0 * * *"
Expand Down
53 changes: 10 additions & 43 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:
name: PHP ${{ matrix.php-version }} - L${{ matrix.laravel-version }} - ${{ matrix.os }}
name: P${{ matrix.php-version }} - L${{ matrix.laravel-version }} - ${{ matrix.os }}

services:
mysql:
Expand All @@ -29,7 +29,7 @@ jobs:
laravel-version: [10, 11]
os: [ubuntu-latest]
exclude:
- laravel: 11.*
- laravel-version: 11.*
php-version: 8.1

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -68,52 +68,19 @@ jobs:
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Create a Laravel app
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel-version }}.* /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example
run: composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel-version }}.* /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example

- name: Link local repository
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: 'composer config repositories.local "{\"type\": \"path\", \"url\": \"/home/runner/work/blueprint/blueprint\"}" --file /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example/composer.json'
run: 'composer config repositories.local "{\"type\": \"path\", \"url\": \"/home/runner/work/blueprint/blueprint\"}" --file /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example/composer.json'

- name: Install Blueprint & laravel-test-assertions
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: cd /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example; composer require --dev laravel-shift/blueprint @dev; composer require jasonmccreary/laravel-test-assertions;
working-directory: /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example
run: composer require --dev laravel-shift/blueprint @dev jasonmccreary/laravel-test-assertions

- name: Run migrate:refresh
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: cd /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example; php artisan migrate:refresh --force
working-directory: /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example
run: php artisan migrate:refresh --force

- name: Run blueprint:build
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: cd /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example; php artisan blueprint:build /home/runner/work/blueprint/blueprint/tests/fixtures/drafts/readme-example.yaml

- name: Run PHPUnit
uses: nick-invision/retry@v1
if: ${{ matrix.laravel-version == 6 }}
with:
timeout_minutes: 5
max_attempts: 5
command: cd /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example; pwd; vendor/bin/phpunit

- name: Run artisan test
uses: nick-invision/retry@v1
if: ${{ matrix.laravel-version != 6 }}
with:
timeout_minutes: 5
max_attempts: 5
command: cd /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example; php artisan test
working-directory: /home/runner/work/blueprint/laravel${{ matrix.laravel-version }}-example
run: php artisan blueprint:build /home/runner/work/blueprint/blueprint/tests/fixtures/drafts/readme-example.yaml

0 comments on commit 56ccee9

Please sign in to comment.