|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + pull_request: |
| 7 | + branches: [master] |
| 8 | + |
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + |
| 12 | +jobs: |
| 13 | + lint-syntax: |
| 14 | + name: Lint syntax (PHP 8.1) |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v5 |
| 18 | + with: |
| 19 | + fetch-depth: 0 |
| 20 | + |
| 21 | + - name: Install devcontainer CLI |
| 22 | + run: npm install -g @devcontainers/cli@0 |
| 23 | + |
| 24 | + - name: Run syntax checks in dev container |
| 25 | + env: |
| 26 | + PHP_VERSION: "8.1" |
| 27 | + run: | |
| 28 | + devcontainer up --workspace-folder . |
| 29 | + devcontainer exec --workspace-folder . bash -lc "git ls-files -z '*.php' | xargs -0 -n1 php -l" |
| 30 | +
|
| 31 | + static-analysis: |
| 32 | + name: Static analysis (PHP 8.1) |
| 33 | + runs-on: ubuntu-latest |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v5 |
| 36 | + with: |
| 37 | + fetch-depth: 0 |
| 38 | + |
| 39 | + - name: Install devcontainer CLI |
| 40 | + run: npm install -g @devcontainers/cli@0 |
| 41 | + |
| 42 | + - name: Run static analysis in dev container |
| 43 | + env: |
| 44 | + PHP_VERSION: "8.1" |
| 45 | + run: | |
| 46 | + devcontainer up --workspace-folder . |
| 47 | + devcontainer exec --workspace-folder . bash -lc "composer run lint-static-analysis" |
| 48 | +
|
| 49 | + backwards-compatibility: |
| 50 | + name: Backwards compatibility (PHP 8.1) |
| 51 | + runs-on: ubuntu-latest |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v5 |
| 54 | + with: |
| 55 | + fetch-depth: 0 |
| 56 | + |
| 57 | + - name: Install devcontainer CLI |
| 58 | + run: npm install -g @devcontainers/cli@0 |
| 59 | + |
| 60 | + - name: Check backwards compatibility in dev container |
| 61 | + env: |
| 62 | + PHP_VERSION: "8.1" |
| 63 | + run: | |
| 64 | + devcontainer up --workspace-folder . |
| 65 | + devcontainer exec --workspace-folder . bash -lc "composer install -n --prefer-dist && composer run test-for-bc-breaks || true" |
| 66 | +
|
| 67 | + test: |
| 68 | + name: Test (PHP ${{ matrix.php-version }}) |
| 69 | + runs-on: ubuntu-latest |
| 70 | + strategy: |
| 71 | + fail-fast: false |
| 72 | + matrix: |
| 73 | + php-version: ["8.0", "8.1", "8.2", "8.3", "8.4"] |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v5 |
| 76 | + with: |
| 77 | + fetch-depth: 0 |
| 78 | + |
| 79 | + - name: Install devcontainer CLI |
| 80 | + run: npm install -g @devcontainers/cli@0 |
| 81 | + |
| 82 | + - name: Run test suite in dev container |
| 83 | + env: |
| 84 | + PHP_VERSION: ${{ matrix.php-version }} |
| 85 | + run: | |
| 86 | + devcontainer up --workspace-folder . |
| 87 | + devcontainer exec --workspace-folder . bash -lc "composer test-quick-fail" |
0 commit comments