CI-5400 Collect logs for tests even if they hang #45
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
| # Main CI pipeline orchestrating build, test, and upload stages | |
| name: Greengage CI | |
| on: | |
| push: | |
| branches: ['6.x', 'main'] # Trigger on push to 6.x/main (after merged PR) | |
| tags: ['6.*'] # Trigger on tags for versioned releases | |
| pull_request: | |
| branches: ['**'] # Trigger on pull requests for all branches | |
| # Concurrency control to cancel previous runs on new push to same PR/branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true # Automatically cancel any previous runs for the same group | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: true # Stop on any failure in the matrix | |
| matrix: | |
| target_os: [ubuntu] | |
| permissions: | |
| contents: read # Explicit for default behavior | |
| packages: write # Required for GHCR access | |
| actions: write # Required for artifact upload | |
| uses: greengagedb/greengage-ci/.github/workflows/greengage-reusable-build.yml@CI-5283 | |
| with: | |
| version: 6 | |
| target_os: ${{ matrix.target_os }} | |
| secrets: | |
| ghcr_token: ${{ secrets.GITHUB_TOKEN }} | |
| behave-tests: | |
| needs: build # Wait for build to complete | |
| if: github.event_name == 'pull_request' # Only for PR | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| target_os: [ubuntu] | |
| permissions: | |
| contents: read # Explicit for default behavior | |
| packages: read # Explicit for GHCR access clarity | |
| actions: write # Required for artifact upload | |
| uses: greengagedb/greengage-ci/.github/workflows/greengage-reusable-tests-behave.yml@CI-5283 | |
| with: | |
| version: 6 | |
| target_os: ${{ matrix.target_os }} | |
| secrets: | |
| ghcr_token: ${{ secrets.GITHUB_TOKEN }} | |
| regression-tests: | |
| needs: build | |
| if: github.event_name == 'pull_request' # Only for PR | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| target_os: [ubuntu] | |
| permissions: | |
| contents: read # Explicit for default behavior | |
| packages: read # Explicit for GHCR access clarity | |
| actions: write # Required for artifact upload | |
| uses: greengagedb/greengage-ci/.github/workflows/greengage-reusable-tests-regression.yml@CI-5283 | |
| with: | |
| version: 6 | |
| target_os: ${{ matrix.target_os }} | |
| secrets: | |
| ghcr_token: ${{ secrets.GITHUB_TOKEN }} | |
| orca-tests: | |
| needs: build | |
| if: github.event_name == 'pull_request' # Only for PR | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| target_os: [ubuntu] | |
| permissions: | |
| contents: read # Explicit for default behavior | |
| packages: read # Explicit for GHCR access clarity | |
| actions: write # Required for artifact upload | |
| uses: greengagedb/greengage-ci/.github/workflows/greengage-reusable-tests-orca.yml@v19 | |
| with: | |
| version: 6 | |
| target_os: ${{ matrix.target_os }} | |
| secrets: | |
| ghcr_token: ${{ secrets.GITHUB_TOKEN }} | |
| resgroup-tests: | |
| needs: build | |
| if: github.event_name == 'pull_request' # Only for PR | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| target_os: [ubuntu] | |
| permissions: | |
| contents: read # Explicit for default behavior | |
| packages: read # Explicit for GHCR access clarity | |
| actions: write # Required for artifact upload | |
| uses: greengagedb/greengage-ci/.github/workflows/greengage-reusable-tests-resgroup.yml@v23 | |
| with: | |
| version: 6 | |
| target_os: ${{ matrix.target_os }} | |
| secrets: | |
| ghcr_token: ${{ secrets.GITHUB_TOKEN }} | |
| upload: | |
| if: github.event_name == 'push' | |
| needs: build | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| target_os: [ubuntu] | |
| permissions: | |
| contents: read # Explicit for default behavior | |
| packages: write # Required for GHCR access | |
| actions: write # Required for artifact upload | |
| uses: greengagedb/greengage-ci/.github/workflows/greengage-reusable-upload.yml@v21 | |
| with: | |
| version: 6 | |
| target_os: ${{ matrix.target_os }} | |
| secrets: | |
| ghcr_token: ${{ secrets.GITHUB_TOKEN }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| # Rebuild prod-redy version without debug extensions and pack it to deb | |
| package: | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target_os: [ubuntu] | |
| permissions: | |
| contents: read # Explicit for default behavior | |
| packages: write # Required for GHCR access | |
| actions: write # Required for artifact upload | |
| uses: greengagedb/greengage-ci/.github/workflows/greengage-reusable-package.yml@v10 | |
| with: | |
| version: 6 | |
| target_os: ${{ matrix.target_os }} | |
| test_docker: ubuntu:22.04 # Docker Image (e.g., ubuntu:22.04, ubuntu:noble) for deploy test. Skip if empty | |
| secrets: | |
| ghcr_token: ${{ secrets.GITHUB_TOKEN }} |