diff --git a/.github/.patch_files b/.github/.patch_files index 7788595..e81898c 100644 --- a/.github/.patch_files +++ b/.github/.patch_files @@ -21,5 +21,6 @@ README.md scripts/.util/print.sh scripts/.util/tools.json scripts/.util/tools.sh +scripts/.util/builders.sh scripts/integration.sh scripts/unit.sh diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index e2b63ed..dde1766 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -18,6 +18,8 @@ jobs: unit: name: Unit Tests runs-on: ubuntu-latest + outputs: + builders: ${{ steps.builders.outputs.builders }} steps: - name: Setup Go uses: actions/setup-go@v3 @@ -27,11 +29,22 @@ jobs: uses: actions/checkout@v3 - name: Run Unit Tests run: ./scripts/unit.sh + - name: Get builders from integration.json + id: builders + run: | + source "${{ github.workspace }}/scripts/.util/builders.sh" + builders="$(util::builders::list "${{ github.workspace }}/integration.json")" + printf "Output: %s\n" "${builders}" + printf "::set-output name=builders::%s\n" "${builders}" integration: name: Integration Tests runs-on: ubuntu-latest needs: unit + strategy: + matrix: + builder: ${{ fromJSON(needs.unit.outputs.builders) }} + fail-fast: false # don't cancel all test jobs when one fails steps: - name: Setup Go uses: actions/setup-go@v3 @@ -41,7 +54,7 @@ jobs: uses: actions/checkout@v3 - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true - name: Run Integration Tests - run: ./scripts/integration.sh --use-token + run: ./scripts/integration.sh --use-token --builder ${{ matrix.builder }} env: GIT_TOKEN: ${{ github.token }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 1fa837f..0487889 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -38,7 +38,7 @@ jobs: printf "::set-output name=builders::%s\n" "${builders}" integration: - name: Integration Tests + name: Integration Tests with Builders runs-on: ubuntu-latest needs: unit strategy: @@ -61,6 +61,15 @@ jobs: env: GIT_TOKEN: ${{ github.token }} + roundup: + name: Integration Tests + runs-on: ubuntu-latest + needs: integration + steps: + - run: | + echo "Integration tests passed against all builders" + exit 0 + upload: name: Upload Workflow Event Payload runs-on: ubuntu-latest