|
8 | 8 | - 'v*' |
9 | 9 | pull_request: |
10 | 10 | workflow_dispatch: |
| 11 | + inputs: |
| 12 | + simulate_nightly: |
| 13 | + description: 'Simulate nightly run (skip checks/unit-tests/docs/sonar)' |
| 14 | + required: false |
| 15 | + type: boolean |
| 16 | + default: false |
11 | 17 | schedule: |
12 | 18 | - cron: "0 0 * * *" # Every day at midnight |
13 | 19 |
|
14 | 20 | env: |
15 | 21 | COMPOSER_HOME: ${{ github.workspace }}/.cache/composer |
16 | 22 | DEFAULT_PHP_VERSION: '8.1' |
| 23 | + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
17 | 24 |
|
18 | 25 | jobs: |
19 | 26 | php-checks: |
20 | 27 | name: php checks |
21 | | - if: github.event_name != 'schedule' |
| 28 | + if: github.event_name != 'schedule' && (github.event_name != 'workflow_dispatch' || !inputs.simulate_nightly) |
22 | 29 | runs-on: ubuntu-latest |
23 | 30 |
|
24 | 31 | steps: |
|
47 | 54 |
|
48 | 55 | php-unit-tests: |
49 | 56 | name: php unit tests (${{ matrix.php-version }}-with-coverage) |
50 | | - if: github.event_name != 'schedule' |
| 57 | + if: github.event_name != 'schedule' && (github.event_name != 'workflow_dispatch' || !inputs.simulate_nightly) |
51 | 58 | runs-on: ubuntu-latest |
52 | 59 | needs: php-checks |
53 | 60 | strategy: |
|
87 | 94 | name: buildOcis |
88 | 95 | runs-on: ubuntu-latest |
89 | 96 | needs: php-checks |
90 | | - if: always() && (success() || github.event_name == 'schedule') |
| 97 | + if: always() && (success() || github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.simulate_nightly)) |
91 | 98 | strategy: |
92 | 99 | fail-fast: false |
93 | 100 | matrix: |
@@ -187,6 +194,7 @@ jobs: |
187 | 194 | name: php integration tests (${{ matrix.php-version}}-${{ matrix.branch }}${{ matrix.branch == 'master' && matrix.php-version == '8.1' && '-with-coverage' || '' }}) |
188 | 195 | runs-on: ubuntu-latest |
189 | 196 | needs: build-ocis |
| 197 | + if: always() && (success() || github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.simulate_nightly)) |
190 | 198 | strategy: |
191 | 199 | fail-fast: false |
192 | 200 | matrix: |
@@ -288,7 +296,7 @@ jobs: |
288 | 296 |
|
289 | 297 | docs: |
290 | 298 | name: docs |
291 | | - if: github.event_name != 'schedule' |
| 299 | + if: github.event_name != 'schedule' && (github.event_name != 'workflow_dispatch' || !inputs.simulate_nightly) |
292 | 300 | runs-on: ubuntu-latest |
293 | 301 | needs: [php-unit-tests, php-integration-tests] |
294 | 302 | steps: |
@@ -322,7 +330,7 @@ jobs: |
322 | 330 |
|
323 | 331 | sonar-analysis: |
324 | 332 | name: sonar analysis |
325 | | - if: github.event_name != 'schedule' |
| 333 | + if: github.event_name != 'schedule' && (github.event_name != 'workflow_dispatch' || !inputs.simulate_nightly) |
326 | 334 | runs-on: ubuntu-latest |
327 | 335 | needs: [php-unit-tests, php-integration-tests] |
328 | 336 | steps: |
|
0 commit comments