Skip to content

Commit

Permalink
Matrix strategy based pre-merge testing. (#1680)
Browse files Browse the repository at this point in the history
* Remove individual premerge tests

* matrix strategy based premerge tests
  • Loading branch information
TrevorBenson authored Sep 3, 2023
1 parent e2e2145 commit 79282b9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 152 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pre-merge Debian
name: Pre-merge

on:
workflow_dispatch:
Expand All @@ -9,10 +9,13 @@ on:
- files/tests/pre-merge/debian-guild-deploy.sh-l.containerfile

jobs:
guild-deploy-and-build-debian:
guild-deploy-and-build:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [rockylinux, ubuntu]
env:
REGISTRY: ghcr.io
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Provide additional free space
Expand Down Expand Up @@ -45,30 +48,34 @@ jobs:
- name: Testing guild-deploy.sh (IO fork of libsodium)
run: |
docker build . \
--file files/tests/pre-merge/debian-guild-deploy.sh-l.containerfile \
--file files/tests/pre-merge/${{ matrix.distro }}-guild-deploy.sh-l.containerfile \
--compress \
--build-arg BRANCH=${{ env.BRANCH }} \
--build-arg COMMIT=${{ env.COMMIT }} \
--build-arg G_ACCOUNT=${{ env.G_ACCOUNT }} \
--tag ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-debian:guild-deploy-l_${{ env.COMMIT }}
- name: Push pre-merge-debian:guild-deploy-l_${{ env.COMMIT }}
--tag ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT }}
- name: Push pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT }}
run: |
docker push ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-debian:guild-deploy-l_${{ env.COMMIT }}
docker push ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT }}
- name: Testing cabal-build-all.sh (IO fork of libsodium)
run: |
echo "Working from PR Branch ${{ env.G_ACCOUNT }}/guild-operators/${{ env.BRANCH }} on Commit ${{ env.COMMIT }}"
docker build . \
--file files/tests/pre-merge/debian-cabal-l.containerfile \
--file files/tests/pre-merge/${{ matrix.distro }}-cabal-l.containerfile \
--compress \
--build-arg BRANCH=${{ env.BRANCH }} \
--build-arg COMMIT=${{ env.COMMIT }} \
--build-arg G_ACCOUNT=${{ env.G_ACCOUNT }} \
--tag ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-debian:cabal-l_${{ env.COMMIT }}
--tag ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }}
- name: Push pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }}
run: |
docker push ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }}
- name: Add summary details
if: always()
run: |
echo "## Summary Details" >> $GITHUB_STEP_SUMMARY
echo "* Docker Image: ${{ env.REGISTRY }}/${{ secrets.DOCKER_USER }}/cardano-node:$${{ env.COMMIT }}" >> $GITHUB_STEP_SUMMARY
echo "* Pre-Merge Guild Deploy Image: ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT }}" >> $GITHUB_STEP_SUMMARY
echo "* Pre-Merge Cabal Build Image: ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }}" >> $GITHUB_STEP_SUMMARY
echo "* BRANCH: ${{ env.BRANCH }}" >> $GITHUB_STEP_SUMMARY
echo "* G_ACCOUNT: ${GITHUB_REPOSITORY_OWNER}" >> $GITHUB_STEP_SUMMARY
echo "* G_ACCOUNT: ${{ env.G_ACCOUNT }}" >> $GITHUB_STEP_SUMMARY
echo "* COMMIT: ${{ env.COMMIT }}" >> $GITHUB_STEP_SUMMARY
74 changes: 0 additions & 74 deletions .github/workflows/premerge_rockylinux.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/premerge_ubuntu.yml

This file was deleted.

0 comments on commit 79282b9

Please sign in to comment.