|
1 | 1 | name: "Main" |
2 | 2 |
|
3 | | -on: # yamllint disable-line rule:truthy |
| 3 | +on: |
4 | 4 | pull_request: null |
5 | 5 | push: |
6 | 6 | branches: |
7 | 7 | - "main" |
8 | 8 |
|
9 | | -env: |
10 | | - DEFAULT_PHP_VERSION: "8.1" |
11 | | - RUN_ENVIRONMENT: "local" |
| 9 | +permissions: {} |
12 | 10 |
|
13 | 11 | jobs: |
14 | 12 | tests: |
15 | | - name : Tests |
16 | | - runs-on: ubuntu-latest |
17 | | - strategy: |
18 | | - fail-fast: false |
19 | | - matrix: |
20 | | - php: |
21 | | - - '8.1' |
22 | | - - '8.2' |
23 | | - - '8.3' |
24 | | - - '8.4' |
25 | | - - '8.5' |
26 | | - steps: |
27 | | - - name: Checkout |
28 | | - uses: actions/checkout@v4 |
29 | | - |
30 | | - - name: "Install PHP" |
31 | | - uses: "shivammathur/setup-php@v2" |
32 | | - with: |
33 | | - coverage: "none" |
34 | | - php-version: "${{ matrix.php }}" |
35 | | - extensions: 'inotify, pcntl' |
36 | | - |
37 | | - - name: "Install dependencies with Composer" |
38 | | - uses: "ramsey/composer-install@v2" |
39 | | - with: |
40 | | - dependency-versions: "locked" |
41 | | - |
42 | | - - name: "Run unit tests" |
43 | | - run: "make test-unit ENV=${{ env.RUN_ENVIRONMENT }}" |
44 | | - |
45 | | - - name: "Run integration tests" |
46 | | - run: "make test-integration ENV=${{ env.RUN_ENVIRONMENT }}" |
| 13 | + uses: TYPO3-Documentation/.github/.github/workflows/reusable-php-tests.yml@main |
| 14 | + with: |
| 15 | + php-versions: '["8.2", "8.3", "8.4", "8.5"]' |
| 16 | + test-unit-command: "make test-unit ENV=local" |
| 17 | + test-integration-command: "make test-integration ENV=local" |
| 18 | + php-extensions: "inotify, pcntl" |
47 | 19 |
|
48 | 20 | quality: |
49 | | - name: Quality |
50 | | - runs-on: ubuntu-latest |
51 | | - steps: |
52 | | - - name: Checkout |
53 | | - uses: actions/checkout@v4 |
54 | | - |
55 | | - - name: "Install PHP" |
56 | | - uses: "shivammathur/setup-php@v2" |
57 | | - with: |
58 | | - coverage: "none" |
59 | | - php-version: "${{ env.DEFAULT_PHP_VERSION }}" |
60 | | - extensions: 'inotify, pcntl' |
61 | | - |
62 | | - - name: "Install dependencies with Composer" |
63 | | - uses: "ramsey/composer-install@v2" |
64 | | - with: |
65 | | - dependency-versions: "locked" |
66 | | - |
67 | | - - name: "Check for normalized composer.json" |
68 | | - run: "composer normalize --dry-run" |
69 | | - |
70 | | - - name: "CGL" |
71 | | - run: "make code-style ENV=${{ env.RUN_ENVIRONMENT }}" |
72 | | - |
73 | | - - name: "PHPSTAN" |
74 | | - run: "make phpstan ENV=${{ env.RUN_ENVIRONMENT }}" |
75 | | - |
76 | | - - name: "Lint guides.xml configurations" |
77 | | - run: "make test-xml ENV=${{ env.RUN_ENVIRONMENT }}" |
78 | | - |
79 | | - - name: "'Documentation' renders without warning'" |
80 | | - run: "make test-docs ENV=${{ env.RUN_ENVIRONMENT }}" |
81 | | - |
82 | | - - name: "'Documentation-rendertest' renders without warning'" |
83 | | - run: "make test-rendertest ENV=${{ env.RUN_ENVIRONMENT }}" |
84 | | - |
85 | | - monorepo-validate: |
86 | | - name: "Validate monorepo structure" |
87 | | - runs-on: "ubuntu-latest" |
88 | | - steps: |
89 | | - - name: "Checkout" |
90 | | - uses: "actions/checkout@v4" |
91 | | - |
92 | | - - name: "Install PHP" |
93 | | - uses: "shivammathur/setup-php@v2" |
94 | | - with: |
95 | | - coverage: "none" |
96 | | - php-version: "${{ env.DEFAULT_PHP_VERSION }}" |
97 | | - extensions: 'inotify, pcntl' |
98 | | - |
99 | | - - name: "Install dependencies with Composer" |
100 | | - uses: "ramsey/composer-install@v2" |
101 | | - with: |
102 | | - dependency-versions: "locked" |
103 | | - |
104 | | - - name: "Validate monorepo" |
105 | | - run: "make test-monorepo ENV=${{ env.RUN_ENVIRONMENT }}" |
| 21 | + uses: TYPO3-Documentation/.github/.github/workflows/reusable-php-quality.yml@main |
| 22 | + with: |
| 23 | + php-version: "8.2" |
| 24 | + cs-fixer-command: "make code-style ENV=local" |
| 25 | + phpstan-command: "make phpstan ENV=local" |
| 26 | + run-xml-lint: true |
| 27 | + xml-lint-command: "make test-xml ENV=local" |
| 28 | + php-extensions: "inotify, pcntl" |
| 29 | + |
| 30 | + composer-normalize: |
| 31 | + uses: TYPO3-Documentation/.github/.github/workflows/reusable-php-command.yml@main |
| 32 | + with: |
| 33 | + php-version: "8.2" |
| 34 | + command: "composer normalize --dry-run" |
| 35 | + php-extensions: "inotify, pcntl" |
| 36 | + |
| 37 | + test-docs: |
| 38 | + uses: TYPO3-Documentation/.github/.github/workflows/reusable-php-command.yml@main |
| 39 | + with: |
| 40 | + php-version: "8.2" |
| 41 | + command: "make test-docs ENV=local" |
| 42 | + php-extensions: "inotify, pcntl" |
| 43 | + |
| 44 | + test-rendertest: |
| 45 | + uses: TYPO3-Documentation/.github/.github/workflows/reusable-php-command.yml@main |
| 46 | + with: |
| 47 | + php-version: "8.2" |
| 48 | + command: "make test-rendertest ENV=local" |
| 49 | + php-extensions: "inotify, pcntl" |
| 50 | + |
| 51 | + validate-monorepo: |
| 52 | + uses: TYPO3-Documentation/.github/.github/workflows/reusable-php-command.yml@main |
| 53 | + with: |
| 54 | + php-version: "8.2" |
| 55 | + command: "make test-monorepo ENV=local" |
| 56 | + php-extensions: "inotify, pcntl" |
0 commit comments