Test matrix with new output #340
This file contains 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: Build and test PRs | |
on: | |
pull_request: | |
paths: | |
- '**' | |
concurrency: | |
group: ci-image-${{ github.head_ref || github.ref }}-${{ github.repository }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: 1 | |
jobs: | |
get-framework-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
git fetch --prune --unshallow | |
- id: set-matrix | |
run: | | |
content=`cat .github/flavors.json` | |
# the following lines are only required for multi line json | |
# the following lines are only required for multi line json | |
content="${content//'%'/'%25'}" | |
content="${content//$'\n'/'%0A'}" | |
content="${content//$'\r'/'%0D'}" | |
# end of optional handling for multi line json | |
# end of optional handling for multi line json | |
echo "matrix={\"include\": $content }" >> $GITHUB_OUTPUT | |
framework: | |
uses: ./.github/workflows/reusable-build-framework-flavor.yaml | |
secrets: inherit | |
with: | |
flavor: ${{ matrix.flavor }} | |
needs: | |
- get-framework-matrix | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJson(needs.get-framework-matrix.outputs.matrix)}} | |
core: | |
uses: ./.github/workflows/reusable-build-flavor.yaml | |
with: | |
flavor: ubuntu | |
install: | |
uses: ./.github/workflows/reusable-install-test.yaml | |
with: | |
flavor: ubuntu | |
needs: | |
- core | |
zfs: | |
uses: ./.github/workflows/reusable-zfs-test.yaml | |
with: | |
flavor: ubuntu | |
needs: | |
- core | |
acceptance: | |
uses: ./.github/workflows/reusable-qemu-acceptance-test.yaml | |
with: | |
flavor: ubuntu | |
needs: | |
- core | |
bundles: | |
uses: ./.github/workflows/reusable-qemu-bundles-test.yaml | |
with: | |
flavor: ubuntu | |
needs: | |
- core | |
reset: | |
uses: ./.github/workflows/reusable-qemu-reset-test.yaml | |
with: | |
flavor: ubuntu | |
needs: | |
- core | |
netboot: | |
uses: ./.github/workflows/reusable-qemu-netboot-test.yaml | |
with: | |
flavor: ubuntu | |
needs: | |
- core | |
upgrade: | |
uses: ./.github/workflows/reusable-upgrade-with-cli-test.yaml | |
with: | |
flavor: ubuntu | |
needs: | |
- core | |
upgrade-latest: | |
uses: ./.github/workflows/reusable-upgrade-latest-test.yaml | |
with: | |
flavor: ubuntu | |
needs: | |
- core | |
encryption: | |
uses: ./.github/workflows/reusable-encryption-test.yaml | |
with: | |
flavor: ubuntu | |
label: ${{ matrix.label }} | |
needs: | |
- core | |
strategy: | |
fail-fast: true | |
matrix: | |
label: | |
- "local-encryption" | |
- "remote-auto" | |
- "remote-static" | |
- "remote-https-pinned" | |
- "remote-https-bad-cert" |