|
1 | 1 | name: CI
|
2 | 2 |
|
3 | 3 | on:
|
| 4 | + workflow_dispatch: |
4 | 5 | push:
|
5 | 6 | paths:
|
6 |
| - - 'src/**' |
7 |
| - - 'test/**' |
| 7 | + - '**.php' |
| 8 | + - 'ci.yml' |
8 | 9 | - 'composer.json'
|
9 | 10 | - 'phpunit.xml.dist'
|
10 | 11 | pull_request:
|
11 | 12 | paths:
|
12 |
| - - 'src/**' |
13 |
| - - 'test/**' |
| 13 | + - '**.php' |
| 14 | + - 'ci.yml' |
14 | 15 | - 'composer.json'
|
15 | 16 | - 'phpunit.xml.dist'
|
16 | 17 |
|
17 | 18 | jobs:
|
18 |
| - tests: |
19 |
| - runs-on: ubuntu-latest |
20 |
| - |
21 |
| - strategy: |
22 |
| - fail-fast: true |
23 |
| - matrix: |
24 |
| - php: [7.4] |
25 |
| - laravel: [7, 6] |
26 |
| - stability: [prefer-lowest, prefer-stable] |
27 |
| - |
28 |
| - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} |
29 |
| - env: |
30 |
| - EXTENSIONS: dom, curl, mbstring, fileinfo |
31 |
| - EXT_CACHE_KEY: ext-cache-v1 |
32 |
| - |
33 |
| - steps: |
34 |
| - - name: Checkout code |
35 |
| - uses: actions/checkout@v2 |
36 |
| - |
37 |
| - - name: Setup extensions cache environment |
38 |
| - id: cache-env |
39 |
| - uses: shivammathur/cache-extensions@v1 |
40 |
| - with: |
41 |
| - php-version: ${{ matrix.php }} |
42 |
| - extensions: ${{ env.EXTENSIONS }} |
43 |
| - key: ${{ env.EXT_CACHE_KEY }} |
44 |
| - |
45 |
| - - name: Cache extensions |
46 |
| - uses: actions/cache@v1 |
47 |
| - with: |
48 |
| - path: ${{ steps.cache-env.outputs.dir }} |
49 |
| - key: ${{ steps.cache-env.outputs.key }} |
50 |
| - restore-keys: ${{ steps.cache-env.outputs.key }} |
51 |
| - |
52 |
| - - name: Setup PHP |
53 |
| - uses: shivammathur/setup-php@v2 |
54 |
| - with: |
55 |
| - php-version: ${{ matrix.php }} |
56 |
| - extensions: ${{ env.EXTENSIONS }} |
57 |
| - coverage: xdebug |
58 |
| - ini-values: xdebug.overload_var_dump=1 |
59 |
| - tools: prestissimo |
60 |
| - |
61 |
| - - name: Get composer cache directory |
62 |
| - id: composer-cache |
63 |
| - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
64 |
| - |
65 |
| - - name: Cache composer dependencies |
66 |
| - uses: actions/cache@v1 |
67 |
| - with: |
68 |
| - path: ${{ steps.composer-cache.outputs.dir }} |
69 |
| - key: ${{ runner.os }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} |
70 |
| - restore-keys: ${{ runner.os }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer- |
71 |
| - |
72 |
| - - name: Install dependencies |
73 |
| - run: | |
74 |
| - composer require "laravel/framework:${{ matrix.laravel }}.*" -n --no-update --no-progress --no-suggest |
75 |
| - composer update --${{ matrix.stability }} --prefer-dist -n --no-suggest --no-progress |
76 |
| -
|
77 |
| - - name: Execute tests |
78 |
| - run: vendor/bin/phpunit --verbose |
| 19 | + ci: |
| 20 | + uses: telegram-bot-sdk/.github/.github/workflows/ci.yml@main |
0 commit comments