Nightly tests #81
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
| name: Nightly tests | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "34 23 * * *" | |
| concurrency: | |
| group: ${{ github.workflow}} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Lint | |
| run: | | |
| npx --yes dclint . | |
| # Finds new release branches at runtime; no workflow edit when new releases are created | |
| discover-branches: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| branches: ${{ steps.set-branches.outputs.branches }} | |
| steps: | |
| - uses: actions/github-script@v9 | |
| id: set-branches | |
| with: | |
| script: | | |
| const branches = await github.paginate(github.rest.repos.listBranches, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| }); | |
| // Keep main and the latest 3 release branches (e.g. release-1.2, release-1.1, release-1.0) - to cover EOL branches and period between FF and GA of new releases | |
| const topReleaseBranches = branches | |
| .map(b => b.name) | |
| .filter(name => /^release-\d+\.\d+$/.test(name)) | |
| .sort((a, b) => b.localeCompare(a, undefined, { numeric: true })) | |
| .slice(0, 3); | |
| core.setOutput('branches', JSON.stringify(['main', ...topReleaseBranches])); | |
| test: | |
| needs: discover-branches | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| branch: ${{ fromJson(needs.discover-branches.outputs.branches) }} | |
| os: | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| tool: | |
| - docker | |
| - podman | |
| userConfig: | |
| - "false" | |
| - "true" | |
| composeConfig: | |
| - name: "default" | |
| cliArgs: "" | |
| - name: "corporate-proxy" | |
| cliArgs: "-f compose.yaml -f compose-with-corporate-proxy.yaml" | |
| - name: "dynamic-plugins-root" | |
| cliArgs: "-f compose.yaml -f compose-dynamic-plugins-root.yaml" | |
| - name: "orchestrator-workflow" | |
| cliArgs: "-f compose.yaml -f orchestrator/compose.yaml" | |
| # TODO: Remove this and the exclude rules below once all supported | |
| # branches include Lightspeed in the base deployment. | |
| - name: "developer-lightspeed" | |
| cliArgs: "-f compose.yaml -f developer-lightspeed/compose.yaml" | |
| exclude: | |
| # ARM tests verify architecture compatibility, not functional differences | |
| # that vary by compose config or container tool. A representative subset | |
| # (docker + default/orchestrator + no user config) is sufficient per branch. | |
| - os: ubuntu-24.04-arm | |
| tool: podman | |
| - os: ubuntu-24.04-arm | |
| userConfig: "true" | |
| - os: ubuntu-24.04-arm | |
| composeConfig: | |
| name: "corporate-proxy" | |
| cliArgs: "-f compose.yaml -f compose-with-corporate-proxy.yaml" | |
| - os: ubuntu-24.04-arm | |
| composeConfig: | |
| name: "dynamic-plugins-root" | |
| cliArgs: "-f compose.yaml -f compose-dynamic-plugins-root.yaml" | |
| - os: ubuntu-24.04-arm | |
| composeConfig: | |
| name: "developer-lightspeed" | |
| cliArgs: "-f compose.yaml -f developer-lightspeed/compose.yaml" | |
| # Skip developer-lightspeed on main and release-1.10: Lightspeed is | |
| # fully integrated with the base deployment. | |
| - branch: "main" | |
| composeConfig: | |
| name: "developer-lightspeed" | |
| cliArgs: "-f compose.yaml -f developer-lightspeed/compose.yaml" | |
| - branch: "release-1.10" | |
| composeConfig: | |
| name: "developer-lightspeed" | |
| cliArgs: "-f compose.yaml -f developer-lightspeed/compose.yaml" | |
| name: "${{ matrix.branch }} - ${{ matrix.tool }} compose - ${{ | |
| matrix.composeConfig.name }}${{ matrix.os != 'ubuntu-24.04' && format(' - | |
| {0}', matrix.os) || '' }}${{ matrix.userConfig == 'true' && ' - user | |
| config' || '' }}" | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| DOCKER_COMPOSE_VERSION: v5.0.1 | |
| PODMAN_IMAGE: quay.io/podman/stable:v5 | |
| CORPORATE_PROXY_IMAGE: docker.io/ubuntu/squid:latest | |
| ACTIONS_RUNNER_DEBUG: ${{ vars.ACTIONS_RUNNER_DEBUG }} | |
| steps: | |
| # Checkout a ref that contains .github/actions/*. schedule: github.ref_name is always the default branch. | |
| # workflow_dispatch: use default_branch (trigger ref may be release-* without the composite on that branch). | |
| - uses: actions/checkout@v7 | |
| with: | |
| ref: ${{ matrix.branch }} | |
| fetch-depth: 1 | |
| - uses: ./.github/actions/rhdh-local-compose-test | |
| with: | |
| git_ref: ${{ matrix.branch }} | |
| container_tool: ${{ matrix.tool }} | |
| compose_cli_args: ${{ matrix.composeConfig.cliArgs }} | |
| compose_config_name: ${{ matrix.composeConfig.name }} | |
| user_config_enabled: ${{ matrix.userConfig }} | |
| override_images: "true" |