Test (Scheduled) #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # Scheduled nightly test run with full coverage | |
| # | |
| # Runs all test configurations daily with coverage enabled for all. | |
| # This moves coverage collection off PRs to reduce CI time on pull requests. | |
| # | |
| # Schedule: 9:00 UTC (4am EST / 5am EDT) | |
| name: Test (Scheduled) | |
| on: | |
| schedule: | |
| # 9:00 UTC = 4:00 AM EST / 5:00 AM EDT | |
| - cron: 0 9 * * * | |
| workflow_dispatch: | |
| inputs: | |
| enable_coverage: | |
| description: Enable coverage collection for all configurations | |
| required: false | |
| type: boolean | |
| default: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| collect: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Collect Docker Dirs | |
| id: docker-dirs | |
| ## | |
| # Collect the docker directory names from ci subdirectories | |
| # and compute display names for each configuration. | |
| run: | | |
| shopt -s nullglob | |
| shopt -s extglob | |
| # Remove compose-shared-* from the list | |
| dirs=( ci/!(compose-shared-*)/docker-compose.yml ) | |
| dirs=( "${dirs[@]%/docker-compose.yml}" ) | |
| dirs=( "${dirs[@]#ci/}" ) | |
| ci/parse_docker_dir.sh "${dirs[@]}" | | |
| jq -rc 'map({ | |
| docker_dir: .output.docker_dir, | |
| php: .output.php, | |
| display_name: "PHP \(.output.php) - \(.output.webserver) - \(.output.database) \(.output.db)", | |
| save_composer_cache: .output.save_composer_cache, | |
| save_node_cache: .output.save_node_cache | |
| }) | "configs=\(.)"' >> "$GITHUB_OUTPUT" | |
| outputs: | |
| configs: ${{ steps.docker-dirs.outputs.configs }} | |
| build: | |
| name: ${{ matrix.config.display_name }} | |
| needs: collect | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: ${{ fromJson(needs.collect.outputs.configs) }} | |
| uses: ./.github/workflows/test.yml | |
| secrets: inherit | |
| with: | |
| docker_dir: ${{ matrix.config.docker_dir }} | |
| display_name: ${{ matrix.config.display_name }} | |
| # Enable coverage for all configurations except PHP 8.6+ | |
| # (xdebug/pcov don't support PHP 8.6 yet) | |
| enable_coverage: ${{ (inputs.enable_coverage == '' || inputs.enable_coverage) && !startsWith(matrix.config.php, '8.6') }} | |
| save_composer_cache: ${{ matrix.config.save_composer_cache == 'true' }} | |
| save_node_cache: ${{ matrix.config.save_node_cache == 'true' }} |