Switch to GHA for e2e tests #12
Workflow file for this run
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: ci | |
| on: [pull_request] # yamllint disable-line rule:truthy | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| jobs: | |
| e2e-tests: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ matrix.tekton-version }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| name: e2e tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false # Keep running if one leg fails. | |
| matrix: | |
| tekton-version: | |
| - lts-latest | |
| # - lts-latest-minus-one | |
| # - lts-latest-minus-two | |
| # - lts-latest-minus-three | |
| include: | |
| - tekton-version: lts-latest | |
| pipeline-version: v1.0.0 | |
| # - tekton-version: lts-latest-minus-one | |
| # pipeline-version: v0.68.1 | |
| # - tekton-version: lts-latest-minus-two | |
| # pipeline-version: v0.65.6 | |
| # - tekton-version: lts-latest-minus-three | |
| # pipeline-version: v0.62.8 | |
| env: | |
| KO_DOCKER_REPO: registry.local:5000/tekton | |
| CLUSTER_DOMAIN: c${{ github.run_id }}.local | |
| ARTIFACTS: ${{ github.workspace }}/artifacts | |
| PULL_BASE_SHA: ${{ github.base_ref }} | |
| PULL_PULL_SHA: ${{ github.head_ref }} | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version-file: "go.mod" | |
| - uses: ko-build/setup-ko@v0.9 | |
| # - name: Install Dependencies | |
| # working-directory: ./ | |
| # run: | | |
| # echo '::group:: install go-junit-report' | |
| # go install github.com/jstemmer/go-junit-report@v0.9.1 | |
| # echo '::endgroup::' | |
| # echo '::group:: created required folders' | |
| # mkdir -p "${ARTIFACTS}" | |
| # echo '::endgroup::' | |
| # echo "${GOPATH}/bin" >> "$GITHUB_PATH" | |
| - name: Run tests | |
| run: | | |
| ./hack/setup-kind.sh \ | |
| --registry-url $(echo ${KO_DOCKER_REPO} | cut -d'/' -f 1) \ | |
| --cluster-suffix c${{ github.run_id }}.local \ | |
| --nodes 3 \ | |
| --pipeline-version ${{ matrix.pipeline-version }} \ | |
| --e2e-script ./test/e2e-tests.sh \ | |
| --e2e-env ./test/e2e-tests-kind-gha.env | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.pipeline-version }} | |
| path: ${{ env.ARTIFACTS }} | |
| - uses: chainguard-dev/actions/kind-diag@main | |
| if: ${{ failure() }} | |
| with: | |
| artifact-name: ${{ matrix.pipeline-version }}-logs | |
| - name: Dump Artifacts | |
| if: ${{ failure() }} | |
| run: | | |
| if [[ -d ${{ env.ARTIFACTS }} ]]; then | |
| cd ${{ env.ARTIFACTS }} | |
| for x in $(find . -type f); do | |
| echo "::group:: artifact $x" | |
| cat $x | |
| echo '::endgroup::' | |
| done | |
| fi |