|
| 1 | +name: Integration Tests on microshift |
| 2 | + |
| 3 | +permissions: |
| 4 | + contents: read |
| 5 | + |
| 6 | +on: |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + - release-* |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 14 | + cancel-in-progress: true |
| 15 | + |
| 16 | +defaults: |
| 17 | + run: |
| 18 | + shell: bash |
| 19 | + |
| 20 | +jobs: |
| 21 | + tekton-triggers-integration-tests-microshift: |
| 22 | + runs-on: ubuntu-24.04 |
| 23 | + name: Integration Tests on microshift |
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + |
| 27 | + env: |
| 28 | + SHELL: /bin/bash |
| 29 | + GOPATH: ${{ github.workspace }} |
| 30 | + GO111MODULE: on |
| 31 | + KO_DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/ |
| 32 | + CLUSTER_DOMAIN: c${{ github.run_id }}.local |
| 33 | + ARTIFACTS: ${{ github.workspace }}/artifacts |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Checkout |
| 37 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 38 | + with: |
| 39 | + path: ${{ github.workspace }}/src/github.com/tektoncd/triggers |
| 40 | + |
| 41 | + - name: Set up Go |
| 42 | + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 |
| 43 | + with: |
| 44 | + cache-dependency-path: "${{ github.workspace }}/src/github.com/tektoncd/triggers/go.sum" |
| 45 | + go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/triggers/go.mod" |
| 46 | + |
| 47 | + - name: Install dependencies |
| 48 | + working-directory: ./ |
| 49 | + run: | |
| 50 | + echo '::group::install ko' |
| 51 | + curl -L https://github.com/ko-build/ko/releases/download/v0.15.4/ko_0.15.4_Linux_x86_64.tar.gz | tar xzf - ko |
| 52 | + echo '::group:: install go-junit-report' |
| 53 | + go install github.com/jstemmer/go-junit-report@v0.9.1 |
| 54 | + echo '::endgroup::' |
| 55 | + chmod +x ./ko |
| 56 | + sudo mv ko /usr/local/bin |
| 57 | + echo '::endgroup::' |
| 58 | +
|
| 59 | + echo '::group::create required folders' |
| 60 | + mkdir -p "${ARTIFACTS}" |
| 61 | + echo '::endgroup::' |
| 62 | +
|
| 63 | + echo "${GOPATH}/bin" >> "$GITHUB_PATH" |
| 64 | +
|
| 65 | + - name: Log in to the Container registry |
| 66 | + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 |
| 67 | + with: |
| 68 | + registry: ghcr.io |
| 69 | + username: ${{ github.actor }} |
| 70 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 71 | + |
| 72 | + - name: Set up MicroShift |
| 73 | + uses: uses: gacts/install-podman@v1 |
| 74 | + run: | |
| 75 | + curl -L -o minc https://github.com/minc-org/minc/releases/latest/download/minc_linux_amd64 |
| 76 | + chmod +x minc |
| 77 | + ./minc create |
| 78 | +
|
| 79 | +
|
| 80 | + - name: Run tests |
| 81 | + working-directory: ${{ github.workspace }}/src/github.com/tektoncd/triggers |
| 82 | + run: | |
| 83 | + ${{ github.workspace }}/src/github.com/tektoncd/triggers/test/gh-e2e-tests.sh |
| 84 | +
|
| 85 | + - name: Upload test results |
| 86 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
| 87 | + if: ${{ failure() }} |
| 88 | + with: |
| 89 | + path: ${{ env.ARTIFACTS }} |
0 commit comments